 |&gt;
  mutate(rank_life_expectancy = round(rank(-life_expectancy_2018), 0)) |&gt;
  select(
    countries_and_areas, rank_life_expectancy, life_expectancy_2018,
    life_expectancy_change
  ) |&gt;
  arrange(rank_life_expectancy)

# List countries and areas' migration rate and population, ordered by rank of migration rate
sowc_demographics |&gt;
  mutate(rank = round(rank(migration_rate))) |&gt;
  mutate(population_millions = total_pop_2018 / 1000) |&gt;
  select(countries_and_areas, rank, migration_rate,