Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Parented

Education backgrounds of parents of entering freshmen at a state university


Description

Data for Exercise 1.32

Usage

Parented

Format

A data frame/tibble with 200 observations on two variables

education

a factor with levels 4yr college degree, Doctoral degree, Grad degree, H.S grad or less, Some college, and Some grad school

parent

a factor with levels mother and father

References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

Examples

T1 <- xtabs(~education + parent, data = Parented)
T1
barplot(t(T1), beside = TRUE, legend = TRUE, col = c("blue", "red"))
rm(T1)
## Not run: 
library(ggplot2)
ggplot2::ggplot(data = Parented, aes(x = education, fill = parent)) + 
    geom_bar(position = "dodge") + 
    theme_bw() +
    theme(axis.text.x  = element_text(angle = 85, vjust = 0.5)) + 
    scale_fill_manual(values = c("pink", "blue")) + 
    labs(x = "", y = "") 

## End(Not run)

BSDA

Basic Statistics and Data Analysis

v1.2.0
GPL (>= 2)
Authors
Alan T. Arnholt [aut, cre], Ben Evans [aut]
Initial release
2017-07-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.