Relative Content

Tag Archive for recodemutate

Replacing numbers with numbers in R?

I just have what seems like a simple list of numbers, that I’d like to recategorize.
The numbers are: 1, 2, 3, 4, 5, 6, 7
I’d like to recode such that 1,2 = 1, 5=2 and 3,4,6,7 = 3.
I’ve tried the following without luck: