CommencerCommencer gratuitement

Nabular data and filling by missingness

Summary statistics are useful to calculate, but as they say, a picture tells you a thousand words.

In this exercise, we are going to explore how you can use nabular data to explore the variation in a variable by the missingness of another.

We are going to use the oceanbuoys dataset from naniar.

Cet exercice fait partie du cours

Dealing With Missing Data in R

Afficher le cours

Instructions

  • First explore the missingness structure of oceanbuoys using vis_miss().
  • Explore the distribution of wind east west (wind_ew) for the missingness of air temperature using geom_density().
  • Explore the distribution of sea temperature for the missingness of humidity using geom_density().

Exercice interactif pratique

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

# First explore the missingness structure of `oceanbuoys` using `vis_miss()`
vis_miss(___)

# Explore the distribution of `wind_ew` for the missingness  
# of `air_temp_c_NA` using  `geom_density()`
bind_shadow(oceanbuoys) %>%
  ggplot(aes(x = ___, 
             color = air_temp_c_NA)) + 
  geom_density()

# Explore the distribution of sea temperature for the  
# missingness of humidity (humidity_NA) using  `geom_density()`
  ___(___) %>%
  ggplot(aes(x = ___,
             color = ___)) + 
  geom_density()
Modifier et exécuter le code