Dear R community, I have a question concerning recoding of a variable. I have a data set in which there is a variable devoted to the ISCO code describing the occupation of this certain individual (http://www.ilo.org/public/english/bureau/stat/isco/isco88/major.htm). Every type of occupation begins with a number and every number added to this number describes th occupation more detailed. Now my problem: I want to recode this variable in a way that every value beginning with a certain number is labeled as the respective category. For example, that all values of this variable beginning with a 6 is labeled as "agri". My problem is that I cannot find a test which I can use for that purpose.
I would really appreciate any help on that subject. Thank you. Best regards Marcel Gerds ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.