Get startedGet started for free

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.

This exercise is part of the course

Analyzing Social Media Data in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Extract tweet text from the pre-loaded dataset
twt_txt <- ___$___
head(twt_txt)
Edit and Run Code