#' Transformar a variavel em fator
#'
#'
#' @param df data.frame em analise
#' @param variavel nome da coluna entre (" ")
#'
#' @return variaveis tipo fator
#' @export
#'
#' @examples
to.factors <- function(df, variables){
for (variable in variables){
df[[variable]] <- as.factor(df[[variable]])
}
return(df)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.