From the course: Learning the R Tidyverse

Unlock the full course today

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

Remember to ungroup before moving on

Remember to ungroup before moving on - R Tutorial

From the course: Learning the R Tidyverse

Start my 1-month free trial

Remember to ungroup before moving on

- [Instructor] Groups are an incredibly powerful feature of the tidyverse. They allow us to do a lot of different operations really neatly and succinctly. But it's really important to remember to get rid of groups when you're finished working with them. Let's look at a few examples of what we can do with groups and why it's important to ungroup when we're finished. Inside of our exercise files, we have a file called data-processing.R so let's open that up. We can see we have a number of different operations that we perform. At the top of the script file, we do whatever we do when we're working with the tidyverse, which is we load the library tidyverse. So if I hit command + enter, I've just decreased the size of the file view because I don't need to see it, we see that library tidyverse loads a standard set of libraries from the tidyverse. On line three, we use the function read_csv to import our data from the csv file and we assign it to the symbol transport_data. So let's run that…

Contents