R/numeric_factor_class.R

numeric_factor_class <- function(x) {
  
  condition <- any(x %in% "ordered")
  if (condition) {
    rout <- "factor"
  } else {
    rout <- x
  }
  
  condition <- any(rout %in% "integer")
  if (condition) {
    rout <- "numeric"
  } else {
    rout <- rout
  }
  
  # return
  return(rout)
  
}
dsnavega/imputeForest documentation built on May 8, 2019, 2:43 p.m.