Skip to content

Don't understand a question in HW 1 (Petnames) #162

@kshantigreene

Description

@kshantigreene

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions