I have a data frame with 203 column. Some of them string and I want to convert them to factor.
like this :
data$var = as.factor((data$var))
The problem is, there is 180 string column. Is there a way to do this with a loop or a sapply maybe ? Anything that can help me to not writing this code 180 times.