#' @export getMiddleInitial
getMiddleInitial <- function(name) {
name <- strsplit(name, " ")
middles <- sapply(name, function(x) x[2])
middles[sapply(name, length)<3] <- NA
middles <- substr(middles, 1, 1)
middles <- tolower(middles)
return(middles)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.