Exercise: Use arrange() based on multiple columns
The gapminder_2007
tibble contains economic and demographic data about various countries for the year 2007. Arrange the tibble and inspect for each continent, which countries had the highest life expectancy in 2007! The dplyr package is already loaded.
- Apply the
arrange()
function on thegapminder_2007
tibble. - Order the tibble based on the
continent
column! - In case there are rows with the same
continent
, sort the tibble in a descending order based on thelifeExp
column!
Results
Submit code to see output here.