CommencerCommencer gratuitement

Counting part colors

Sometimes you'll want to do some processing before you do a join, and prioritize keeping the second (right) table's rows instead. In this case, a right join is for you.

In this exercise, we'll count the part_cat_id from parts, before using a right_join to join with part_categories. The reason we do this is because we don't only want to know the count of part_cat_id in parts, but we also want to know if there are any part_cat_ids not present in parts.

Cet exercice fait partie du cours

Joining Data with dplyr

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

parts %>%
  # Count the part_cat_id
  ___ %>%
  # Right join part_categories
  ___
Modifier et exécuter le code