CommencerCommencer gratuitement

Remove URLs and characters other than letters

Tweet text posted by twitter users is unstructured, noisy, and raw.

It contains emoticons, URLs, and numbers. This redundant information has to be cleaned before analysis in order to yield reliable results.

In this exercise, you will remove URLs and replace characters other than letters with spaces.

The tweet data frame twt_telmed, with 1000 extracted tweets on "telemedicine", has been pre-loaded for this exercise.

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

Cet exercice fait partie du cours

Analyzing Social Media Data in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Extract tweet text from the pre-loaded dataset
twt_txt <- ___$___
head(twt_txt)
Modifier et exécuter le code