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.
Deze oefening maakt deel uit van de cursus
Data Manipulation with dplyr
Oefeninstructies
- Use
group_by()andslice_max()to find the most common name for US babies in each year.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
babynames %>%
# Find the most common name in each year
___