library(ggplot2)
ggplot(births14, aes(x = habit, y = weight)) +
geom_boxplot() +
labs(x = "Smoking status of mother", y = "Birth weight of baby (in lbs)")
ggplot(births14, aes(x = whitemom, y = visits)) +
geom_boxplot() +
labs(x = "Mother's race", y = "Number of doctor visits during pregnancy")
ggplot(births14, aes(x = mature, y = gained)) +
geom_boxplot() +
labs(x = "Mother's age category", y = "Weight gained during pregnancy")
Run the code above in your browser using DataLab