#' Convert all factors in a data.frame to strings
#'
#' @param df the data frame to operate on
#'
#' @return modified data.frame with factor columns converted to character-type
#' @export
unfactor <- function(df) {
id <- sapply(df, is.factor)
df[id] <- lapply(df[id], as.character)
df
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.