Aan de slagGa gratis aan de slag

Variable assignment

Throughout the exercises in this chapter, you'll be visualizing a subset of the gapminder data from the year 1952. First, you'll have to load the ggplot2 package, and create a gapminder_1952 dataset to visualize.

By the way, if you haven't downloaded it already, check out the Tidyverse For Beginners Cheat Sheet. It includes an overview of the most important concepts, functions and methods and might come in handy if you ever need a quick refresher!

Deze oefening maakt deel uit van de cursus

Introduction to the Tidyverse

Cursus bekijken

Oefeninstructies

  • Load the ggplot2 package after the gapminder and dplyr packages.
  • Filter gapminder for observations from the year 1952, and assign it to a new dataset gapminder_1952 using the assignment operator (<-).

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Load the ggplot2 package as well
library(gapminder)
library(dplyr)


# Create gapminder_1952
Code bewerken en uitvoeren