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