MulaiMulai sekarang secara gratis

Finding the most popular names each year

You saw that you could use filter() and arrange() to find the most common names in one year. However, you could also use group_by() and slice_max() to find the most common name in every year.

Latihan ini adalah bagian dari kursus

Data Manipulation with dplyr

Lihat Kursus

Petunjuk latihan

  • Use group_by() and slice_max() to find the most common name for US babies in each year.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

babynames %>%
  # Find the most common name in each year
  ___
  
Edit dan Jalankan Kode