Skip to content

repeating categorical variable codes

1 message · PIKAL Petr

#
Not much. 

let say
[1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j"
[1] 2 3 2 3 1 1 1 3 1 1

Than
[1] "a" "a" "b" "b" "b" "c" "c" "d" "d" "d" "e" "f" "g" "h" "h" "h" "i" 
"j"

gives you repeating letters according to values in second vector. If this 
is not what you want, try to send some artificial example which 
illustrates what you really have and what is desired result.

Regards
Petr
given