#' Anonymize factors
#'
#' Rename factor levels with unique, random characters.
#'
#' @param factor factor
#'
#' @return factor
#' @export
#'
#' @examples
#' anon_factor(iris$Species)
anon_factor <- function(factor) {
l <- length(levels(factor))
new_levels <- create_anon_chars(l)
levels(factor) <- new_levels
return(factor)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.