I need some help tidying my data. I\'m trying to convert some integers to factors (but not all integers to factors). I think I can do with selecting the variables in question
Honestly, I'd do it like this:
library(dplyr) df = data.frame("LOC_ID" = c(1,2,3,4), "STRS" = c("a","b","c","d"), "UPC_CDE" = c(813,814,815,816)) df$LOC_ID = as.factor(df$LOC_ID) df$UPC_CDE = as.factor(df$UPC_CDE)