Rows: 197 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): breed, coat_type, coat_length
dbl (5): affectionate, children, other_dogs, shedding, grooming
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
What is the overall mean rating for affectionate?
summarise(traits, mean(affectionate))
# A tibble: 1 × 1
`mean(affectionate)`
<dbl>
1 4.50
What is the overall mean rating for all rating columns ignoring NAs?
# A tibble: 4 × 6
coat_length affectionate children other_dogs shedding grooming
<chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Long 3 3 2 1 1
2 Medium 3 2 1 1 1
3 Short 1 1 1 1 1
4 <NA> 4 5 5 3 2
What are the sample size, mean, and standard deviation of shedding ratings for medium coat length dogs per coat type sorted from largest to smallest sample size and only including coat types with 5 or more samples?
Calculate each breed’s mean rating across all ratings columns and return a data frame with the highest rating for each coat type. Don’t forget to undo rowwise() with ungroup() before further calculations.