## ---- echo=FALSE, include=FALSE------------------------------------------
library(WilliamsFaculty)
library(xlsx)
library(DT)
library(ggplot2)
data=read.xlsx(system.file("extdata","data.xlsx", package="WilliamsFaculty"),1)
## ---- fig.width=5, fig.height=5------------------------------------------
plot_age()
## ------------------------------------------------------------------------
age_summary()
## ------------------------------------------------------------------------
datatable(data, options = list(pageLength=6))
## ------------------------------------------------------------------------
age_summary(gender=TRUE)
## ------------------------------------------------------------------------
age_summary(dpmt=TRUE)
## ----fig.width=8---------------------------------------------------------
plot_by_dpmt()
## ---- fig.width=5--------------------------------------------------------
plot_by_gender()
## ------------------------------------------------------------------------
plot_by_dpmt("Languages")
## ----fig.width=6,fig.height=5--------------------------------------------
color_by_gender()
## ----fig.width=6,fig.height=6--------------------------------------------
color_by_dpmt()
## ---- fig.width=6,fig.height=6-------------------------------------------
color_by_dpmt(c("Physics/Astronomy","Theatre/Dance","Languages"))
## ------------------------------------------------------------------------
average_age()
## ------------------------------------------------------------------------
test_age(gender=TRUE, dpmt=FALSE)
## ------------------------------------------------------------------------
test_age(gender=FALSE, dpmt=TRUE)
## ------------------------------------------------------------------------
test_age()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.