Skip to content

repeating categorical variable codes

2 messages · Richard Iles, PIKAL Petr

#
Hi
code
household=A
in
codes
I am not sure if I understand your problem but does rep(A, B)

give you what you want?

rep(letters[1:3], 1:3)
[1] "a" "b" "b" "c" "c" "c"

Regards
Petr
http://www.R-project.org/posting-guide.html