R/varivel_fator.R

Defines functions to.factors

Documented in to.factors

#' 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)
}
ViniciusJacobs/analisecredito documentation built on Sept. 12, 2020, 11:36 a.m.