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

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