#' Determines the number of each type of gender in a faculty list
#' @param staff a list of faculty
#' @return list the counts of each gender
#' @export
gender_count <- function(staff){
genders <- determine_genders(staff)
a <- c() # to hold the gender counts
a["male"] <- length(grep("male", genders))
a["female"] <- length(grep("female", genders))
a["both"] <- length(grep("both", genders))
a["unlisted"] <- length(grep("not listed", genders))
return(a)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.