# Load your libraries here library(aws.s3) library('lehmansociology') library('ggplot2')
This next chunk loads the GSS data.
s3load('gss.Rda', bucket = 'lehmansociologydata')
summary(GSS$childs) IQR(GSS$childs) var(GSS$childs) sd(GSS$childs) summary(GSS$chldidel) IQR(GSS$chldidel, na.rm=TRUE) var(GSS$chldidel, na.rm=TRUE) sd(GSS$chldidel, na.rm=TRUE) summary(GSS$hrs2) IQR(GSS$hrs2, na.rm=TRUE) var(GSS$hrs2, na.rm=TRUE) sd(GSS$hrs2, na.rm=TRUE) summary(GSS$tvhours) IQR(GSS$tvhours, na.rm=TRUE) var(GSS$tvhours, na.rm=TRUE) sd(GSS$tvhours, na.rm=TRUE)
ggplot_childs <-ggplot(GSS, aes(childs)) ggplot_childs + geom_histogram(binwidth =1, aes(y=(..count../sum(..count..))*100)) + ggtitle("")+ labs(y="Percent", x="") #NOW ADD CODE TO GET A HISTOGRAM FOR CHLIDEL, HRS2, TVHOURS. CONSIDER THE BINWIDTH BASED ON WHAT YOU LEARNED IN THE SWIRL LESSON.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.