From the course: Text Analytics and Predictions with R Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Preparing data - R Tutorial
From the course: Text Analytics and Predictions with R Essential Training
Preparing data
- [Instructor] For building the word cloud in R, we will use two text documents for our course descriptions. These are available in the courses subdirectory in your course examples. These are descriptions for two courses. Let's build a word cloud for the popular words used in these courses. The code for this chapter is available in the file code_01_XX Word Cloud.R. In this video, we will prepare the data for doing word cloud. To start, we import the tm package in R for use in this course. Now, we create a raw course corpus by loading the contents of the courses directory into a VCorpus variable. Next, we perform a series of cleansing steps. If you are unfamiliar with these steps, check out the Processing Text with R Training on LinkedIn Learning. We first convert the corpus into lowercase using the tm_map function. Then we remove punctuations. Stopwords removal is done using the standard stopwords list.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.