Description Usage Format Source Examples
Results from the US Census American Community Survey, 2012.
| 1 | data("acs12")
 | 
A data frame with 2000 observations on the following 13 variables.
incomeAnnual income.
employmentEmployment status.
hrs_workHours worked per week.
raceRace.
ageAge, in years.
genderGender.
citizenWhether the person is a U.S. citizen.
time_to_workTravel time to work, in minutes.
langLanguage spoken at home.
marriedWhether the person is married.
eduEducation level.
disabilityWhether the person is disabled.
birth_qrtrThe quarter of the year that the person was born,
e.g. Jan thru Mar.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(acs12)
d <- subset(acs12, 30 <= age & age <= 60)
d <- subset(d, employment == "employed" & income > 0)
d <- na.omit(d[c("age", "income")])
par(mfrow = c(2, 1), mar = c(5, 5, 1, 1))
plot(d$age, d$income)
m <- lm(income ~ age, data = d)
abline(m)
summary(m)
plot(d$age, log(d$income))
ml <- lm(log(income) ~ age, data = d)
abline(ml)
summary(ml)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.