ComeçarComece de graça

Visualizing the weights

Graphics are a much better way of visualizing data than just staring at the raw data frame! Therefore, in this activity, we will load the data visualization package ggplot2 to create a histogram of the survey weights.

Este exercício faz parte do curso

Analyzing Survey Data in R

Ver curso

Instruções do exercício

  • Load the data visualization package ggplot2.
  • From the pre-loaded data frame, ce, construct a histogram of the survey weights.
  • Remember that the survey weights are stored in the column labeled FINLWT21.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Load ggplot2
library(___)

# Construct a histogram of the weights
ggplot(data = ___, mapping = aes(x = ___)) +
    geom____()
Editar e executar o código