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

Using relocate

As you learned in the video, the relocate() verb allows you to move columns around relative to other columns or its overall position in the tibble.

You've been given the counties_selected tibble, which contains the columns you need for your analysis of population density, but in an order that isn't easy to read. You'll use your new-found skills to put them right!

Bu egzersiz

Data Manipulation with dplyr

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

Egzersiz talimatları

  • Move the density column to the end of the tibble.
  • Move the population column to before the land_area column.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

counties_selected %>%
  # Move the density column to the end
  ___
  # Move the population column to before land_area
  ___
Kodu Düzenle ve Çalıştır