CommencerCommencer gratuitement

When did humans replace dogs in space?

You already know that in the early days of spaceflight, the USSR was testing rockets with dogs. You now wonder when exactly humans started replacing dogs on space flight missions. You've been given a dataset space_df with the number of both dogs (compiled by Duncan Geere) and humans in space per year from 1951 till 1970 (collected from Wikipedia).

Your goal is to create a plot that shows you the number of individuals sent into space per species. Before you can create this plot, you'll first have to introduce zero values for missing combinations of year and species.

The dplyr and ggplot2 packages have been pre-loaded for you.

Cet exercice fait partie du cours

Reshaping Data with tidyr

Afficher le cours

Exercice interactif pratique

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

# Create a tibble with all combinations of years and species
full_df <- ___

full_df
Modifier et exécuter le code