vignettes/WilliamsFaculty.R

## ---- 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()
yz4/WilliamsFaculty documentation built on May 4, 2019, 8:47 p.m.