Aan de slagGa gratis aan de slag

Finding multiple matches

Two new data.tables have been loaded in your workspace:

  • life_exp: contains the life expectancy of each country in 2010 sourced from the Gapminder foundation
  • continents: contains a mapping between each country and the continent(s) they are part of built from information provided by Countries-ofthe-World.com.

In this exercise, you will find the countries that are listed in more than one continent

Deze oefening maakt deel uit van de cursus

Joining Data with data.table in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# How many continents is each country listed in?
___[___, on = .(country), .N, 
    by = ___]
Code bewerken en uitvoeren