R/convert2factor.r

Defines functions convert2factor

  convert2factor = function(x, vars) {
    for (i in vars) x[,i] = as.factor(as.character(x[,i]))
    return(x)
  }
jae0/snowcrab documentation built on Nov. 6, 2024, 10:13 p.m.