ComenzarEmpieza gratis

Agregar por tema

Antes combinaste tablas para comparar temas. Antes de hacer esa comparación, conviene agregar los datos para saber más sobre las piezas que forman parte de cada tema y también sobre los colores de esas piezas.

La tabla que creaste antes se ha precargado como inventory_sets_themes. Se filtró por cada tema y los objetos se han guardado como batman y star_wars.

inventory_sets_themes <- inventory_parts_joined %>%
  inner_join(sets, by = "set_num") %>%
  inner_join(themes, by = c("theme_id" = "id"), suffix = c("_set", "_theme"))

batman <- inventory_sets_themes %>%
  filter(name_theme == "Batman")

star_wars <- inventory_sets_themes %>%
  filter(name_theme == "Star Wars")

Este ejercicio forma parte del curso

Uniones de datos con dplyr

Ver curso

Instrucciones del ejercicio

  • Cuenta el número de pieza y el id de color para las piezas de Batman y Star Wars, ponderado por quantity.

Ejercicio interactivo práctico

Prueba este ejercicio y completa el código de muestra.

# Count the part number and color id, weight by quantity
batman %>%
  ___

star_wars %>%
  ___
Editar y ejecutar código