ComenzarEmpieza gratis

Build a corpus and convert to lowercase

A corpus is a list of text documents. You have to convert the tweet text into a corpus to facilitate subsequent steps in text processing.

When analyzing text, you want to ensure that a word is not counted as two different words because the case is different in the two instances. Hence, you need to convert text to lowercase.

In this exercise, you will create a text corpus and convert all characters to lower case.

The cleaned text output from the previous exercise has been pre-loaded as twts_gsub.

The library tm has been pre-loaded for this exercise.

Este ejercicio forma parte del curso

Analyzing Social Media Data in R

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Convert text in "twt_gsub" dataset to a text corpus and view output
twt_corpus <- twt_gsub %>% 
                ___() %>% 
                ___() 
head(twt_corpus$___)
Editar y ejecutar código