Session Ready
Exercise

Tidyverse Refresher (Mutate)

In this exercise, you will see a plot of GDP value over time in Rwanda. However, since there's no column with the GDP value in the dataset, you will need to calculate this value by multiplying gdpPercap * pop.

In such cases, you can add the calculated value to the dataset as a new column using mutate(). Then, to extract particular entries, you can use filter().

Note that:

  • rbokeh, gapminder and dplyr libraries are pre-loaded.
Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Add gdp_millions column to gapminder using mutate(), where gdp_millions equals gdpPercap * pop/ 10^6.