the question like this :

 x=c(2,6,8,11,11,11,6,8,2,8,6,11,8,2,6,11)

x contains values (2, 6, 8, 11) with frequency (3, 4, 4, 5).

now I want to get the vector by replacing  (2, 6, 8, 11) --->>> (1 2 3 4)

that is, want to get new x as (1 2 3 4 4 4 2 3 1 3 2 4 3 1 2 4)


is there any function in R do this?

Thank you!!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to