births | R Documentation |
Data on a random sample of 100 births for babies in North Carolina where the mother was not a smoker and another 50 where the mother was a smoker.
births
A data frame with 150 observations on the following 14 variables.
Father's age.
Mother's age.
Weeks at which the mother gave birth.
Indicates whether the baby was premature or not.
Number of hospital visits.
Weight gained by mother.
Birth weight of the baby.
Gender of the baby.
Whether or not the mother was a smoker.
Birth records released by North Carolina in 2004.
We do not have ideal provenance for these data. For a better documented and more recent dataset on a similar topic with similar variables, see births14. Additionally, ncbirths also contains similar data.
library(ggplot2)
ggplot(births, aes(x = smoke, y = weight)) +
geom_boxplot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.