ComenzarEmpieza gratis

Survey-weighted histograms

If we want to understand the distribution of nightly sleep for Americans, we should construct a histogram. Let's do that now and see the impact of changing the width of the bins.

Este ejercicio forma parte del curso

Analyzing Survey Data in R

Ver curso

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# Create a histogram with a set binwidth
ggplot(data = ___,
       mapping = aes(___)) + 
	geom_histogram(binwidth = ___,
                   color = "white") +
	labs(x = "Hours of Sleep")
Editar y ejecutar código