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.

Filtering cases and subgroups

Filtering cases and subgroups

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

Start my 1-month free trial

Filtering cases and subgroups

- [Instructor] I want to finish our discussion of wrangling data by talking about a relatively simple but meaningful task of filtering data. That is, selecting cases, individual cases or sub groups in your data, to focus on them or to compare them against each other. The ability to drill down in your data is one of the great things you can do to get extra insight and nuance in your analyses. To do this I'm going to load a few packages, including rio which is for importing data, because I'm going to be using an Excel file that I created called StateData.xlsx. In fact, if you go to the exercise files, you'll see it right here, I have it in both Excel format and in CSV. This is appearing simply because I have it open in Microsoft Excel right now, in fact, let me just show that to you. This is the data set, it's based on a few different sources where we have the 48 continental United States with their state code, their region,…

Contents