Skip to content
Prev 256046 / 398506 Next

Odp: Need a more efficient way to implement this type of logic in R

Hi

r-help-bounces at r-project.org napsal dne 06.04.2011 22:02:29:
'17'))
Take advantage of factors. If hh.sub$HHFAMINC was factor you can recode it 
by

levels(hh.sub$HHFAMINC)<-appropriate vector of new levels with the same 
length as levels

Something like
[1] a b c d e
Levels: a b c d e
[1] 1 1 2 2 1
Levels: 1 2
Regards
Petr
http://www.R-project.org/posting-guide.html