I have a numeric vector containing elements of different values
m<-c(0,1,3,1,0,4,6,3,7,1)
I want to replace each unique element with a particular character element: 0 with "NA", 1 with "blue", 3 with "green", 4 with "purple", 6 with "pink", 7 with "yellow" and get the output in a different vector
The output should look like this:
>m2
"NA","blue","green","blue","NA","purple","pink","green","yellow","blue"