Aan de slagGa gratis aan de slag

Summarizing by continent and year

Instead of grouping just by year, or just by continent, you'll now group by both continent and year to summarize within each.

Deze oefening maakt deel uit van de cursus

Introduction to the Tidyverse

Cursus bekijken

Oefeninstructies

  • Find the median life expectancy (lifeExp) and maximum GDP per capita (gdpPercap) within each combination of continent and year, saving them into medianLifeExp and maxGdpPercap, respectively.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

library(gapminder)
library(dplyr)

# Find median life expectancy and maximum GDP per capita in each continent/year combination
Code bewerken en uitvoeren