From the course: R Essential Training: Wrangling and Visualizing Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Recoding categorical data

Recoding categorical data

From the course: R Essential Training: Wrangling and Visualizing Data

Start my 1-month free trial

Recoding categorical data

- [Narrator] One of the most common ways of reshaping reforming your data is to recode the categorical variables, to either combine categories, choose specific ones you want, or manipulate them in other ways. Again, that helps you focus on the questions that you have. In this demonstration, I want to show you some special functions that are part of the tidy verse in a package called it forcats, as in fort categorical variables or for factor. And I'm going to come down and install these packages first, and then when it come down, I'm going to load a data set that gives the popularity of mobile operating systems in the United States over several years. I'm going to import that and save it as a table. And then when we look at that, it's got a lot of variables because it has month by month data for many years, but you see, it lists many different mobile operating systems and it gives their percentage of market share.…

Contents