Download the file TMP.xlsx
https://github.com/alanarnholt/STT3850/blob/gh-pages/Data/TMP.xlsx and upload it to your account. Use the package readxl
along with the function read_excel()
to read the excel spreadsheet into an R object named DF
.
Find and fix the problem(s) with the variable Age_Cohort
.
What is the average of expenditures for: (a) all males, (b) all Hispanics, (c) all 22-50 year olds, (d) all male, White non-Hispanics, and (e) all Asian, 22-50 year olds?
Use ggplot2
to create appropriate barplots for all of the answers in the previous bullet.