BaşlayınÜcretsiz Başlayın

Arranging observations by life expectancy

You use arrange() to sort observations in ascending or descending order of a particular variable. In this case, you'll sort the dataset based on the lifeExp variable.

Bu egzersiz

Introduction to the Tidyverse

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Sort the gapminder dataset in ascending order of life expectancy (lifeExp).
  • Sort the gapminder dataset in descending order of life expectancy.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

library(gapminder)
library(dplyr)

# Sort in ascending order of lifeExp


  
# Sort in descending order of lifeExp

Kodu Düzenle ve Çalıştır