From the course: R Essential Training: Wrangling and Visualizing Data
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Piping commands with %>%
From the course: R Essential Training: Wrangling and Visualizing Data
Piping commands with %>%
- [Instructor] I want to finish our setup by talking about how you can pipe commands in R using this funny little series of characters, the percent signs with the greater than symbol in the middle, known as the piping character, which is included as part as the Tidyverse. Now, there's a reason that I need to cover this one separately and it's because it dramatically changes the way you write code. But I think this is in good ways. Let me give you an example of command and how you would write it in base R. Base R uses nested commands, which mean you start in the middle and you go out. So say for instance, here's a command that I actually have used. It's about taking data from a dataset called UCBAdmissions and then eventually turning it into a table with percentages. Well, the very first thing that we start with is the data, that's UCBAdmissions, that's here in the middle. But then what I want is I want to get what's margin…
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.
Contents
-
-
-
-
Installing R1m 25s
-
(Locked)
Environments for R3m 31s
-
(Locked)
Installing RStudio1m 17s
-
(Locked)
Navigating the RStudio environment6m 4s
-
(Locked)
Entering data7m 5s
-
(Locked)
Data types and structures12m 24s
-
(Locked)
Comments and headers4m 59s
-
(Locked)
Packages for R4m 46s
-
(Locked)
The tidyverse3m 4s
-
(Locked)
Piping commands with %>%4m 33s
-
-
-
-
-
-