Finding multiple matches
Two new data.table
s have been loaded in your workspace:
life_exp
: contains the life expectancy of each country in 2010 sourced from the Gapminder foundationcontinents
: 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
This exercise is part of the course
Joining Data with data.table in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# How many continents is each country listed in?
___[___, on = .(country), .N,
by = ___]