[R] convert data

Muhammad Subianto subianto at cs.uu.nl
Thu Dec 4 18:04:34 CET 2003


Dear R-helper,
I have a data set like:

OLDa
ALL
OLDc
OLDa
OLDb
NEW
OLDb
OLDa
ALL
. . .
ALL
OLDc
NEW

I want to convert that data as OLDa=1, OLDb=2, OLDc=3, NEW=4 and ALL=5 
or the result like:

1
5
3
1
2
4
2
1
5
. . .
5
3
4

How can I do it. Thanks you for your help.

Best regards,
Muhammad Subianto




More information about the R-help mailing list