Loading the gapminder and dplyr packages
Before you can work with the gapminder
dataset, you'll need to load two R packages that contain the tools for working with it, then display the gapminder
dataset so that you can see what it contains.
When you submit your code, your R script is executed and the output is shown in the console/shell. DataCamp checks whether your submission is correct and gives you feedback. You can submit your code as often as you want. If you're stuck, you can ask for a hint or a solution by clicking the lightbulb icon.
You can use the console/shell interactively by simply typing R code and hitting Enter. When you work in the console directly, your code will not be checked for correctness so it is a great way to experiment and explore.
This course introduces a lot of new concepts, so if you ever need a quick refresher, download the Tidyverse For Beginners Cheat Sheet and keep it handy!
This exercise is part of the course
Introduction to the Tidyverse
Exercise instructions
- Use the
library()
function to load thedplyr
package, just like we've loaded thegapminder
package for you. - Type
gapminder
, on its own line, to look at the gapminder dataset.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Load the gapminder package
library(gapminder)
# Load the dplyr package
# Look at the gapminder dataset