From the course: Learning the R Tidyverse
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Datasets built into the tidyverse packages - R Tutorial
From the course: Learning the R Tidyverse
Datasets built into the tidyverse packages
- [Instructor] In this course, we're going to depend a lot on dataset built into the tidyverse, so I want to make sure we're all on the same page. And as a bonus, you're going to learn about the vcdExtra package. So we're in project 01_07b and I'm in the tidyverse-datasets.r script and the dataset that we will use a lot because it's my favorite is msleep. Now if I run msleep, I'm going to get an error message, "Object msleep not found." And that's because it's from the tidyverse. Let's load the tidyverse. So when we run that, it's going to load the core tidyverse packages, including ggplot2, which contains msleep. So now if I run line four, I'm going to get that tibble printed to the console. But what other datasets are available in that package? Well, that brings me to the vcdExtra package. So if we load that package, and then I'm going to call the function datasets from vcdExtra, we can see in the order completion, and I'm going to give it the name of the package ggplot2. I'm going…
Contents
-
-
-
What is the tidyverse?2m 22s
-
Installing, loading, and working with the tidyverse packages5m 1s
-
(Locked)
Introducing data.frame and tibbles8m 34s
-
What are %>% and |> for in the tidyverse3m 46s
-
(Locked)
Using the %>% pipe in your code5m
-
(Locked)
Using the |> pipe in your code6m 18s
-
(Locked)
Datasets built into the tidyverse packages3m 15s
-
(Locked)
Using the select() function to obtain columns from data4m 23s
-
(Locked)
Using the filter() function to filter data by conditions6m 10s
-
(Locked)
Using the mutate() function to modify and add columns4m
-
(Locked)
Challenge: Rewrite this code to use the pipe of your choice2m 38s
-
(Locked)
Solution: Rewrite this code to use the pipe of your choice3m 19s
-
-
-
-
-
-
-