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.
Create traits2 where we delete the coat columns, so we only have breed and ratings data.
traits2 <- traits |>select(-contains("coat"))
Is traits2 tidy?
Is traits2 in wide or long format?
Reshape traits2 so that all of the ratings scores are in a single column called rating with a column labeling what kind of rating it is called scale. Assign this to traits3.
Spread out the data into wide format with separate columns for the shedding and grooming data, then create a new column diff that subtracts grooming from shedding ratings.