# NOT RUN {
df <- data.frame(x = 1:3, y = 3:1, z = c("a", "b", "c"),
stringsAsFactors = FALSE)
vars <- names(df)
newdf <- df <- chr_2_factor(df, vars)
lapply(df, class)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab