avneet singh
2005-Feb-17 18:25 UTC
[R] How to convert a particular column of data.frame from numerical into factor
I found ways to convert the entire data frame into factors but could you please tell me a way to convert just few particular columns from numeric to factors. Thank you I believe in equality for everyone, except reporters and photographers. ~Mahatma Gandhi
avneet singh
2005-Feb-17 20:15 UTC
[R] How to convert a particular column of data.frame from numerical into factor
Thanks to the two Gentlemen i have my answer. I am posting it in case some newbie like me would need advice while starting with R. I am not sure how often it is conveyed but your help is surely appreciated. ANSWER: df$yourColumn <- factor(df$yourColumn) Thanks to: James Holtman & Peter Alspach ps: i cant believe it was that simple! I believe in equality for everyone, except reporters and photographers. ~Mahatma Gandhi