-
Notifications
You must be signed in to change notification settings - Fork 457
Description
Hi Mine,
I don't understand question 4 in Petnames:
A tibble: 53 × 3
Groups: species [4]
species animal_name n
1 Cat 406
2 Cat Luna 111
3 Cat Lucy 102
4 Cat Lily 86
5 Cat Max 83
6 Dog Lucy 337
7 Dog Charlie 306
8 Dog Bella 249
9 Dog Luna 244
10 Dog Daisy 221
ℹ 43 more rows
Based on the previous output we can easily identify the most common cat and dog names in Seattle, but the output is sorted by n (the frequencies) as opposed to being organized by the species. Build on the pipeline to arrange the results so that they’re arranged by species first, and then n. This means you will need to add one more step to the pipeline, and you have two options: arrange(species, n) or arrange(n, species). You should try both and decide which one organizes the output by species and then ranks the names in order of frequency for each species.
As far as I can tell, the above from the previous example sorts this by species and then name. This means there seems to be nothing else to do, unless I am misunderstanding. Could you please clarify?
Thanks,
Kshanti