>
> Hi Petr,
>
> Thank you for the reply. Unfortunately my repetition is not uniform, but
> dependent on values given in column B, which varies by each row.
>
> Does this make it any clearer?
Not much.
let say
> A <- letters[1:10]
> B <- sample(1:3, 10, replace =TRUE)
> A
[1] "a" "b" "c"
I would appreciate help in knowing how to repeat categorical variable code
given in column=A, by the number in a matching column=B.
For example, I have a categorical variable code attributed to a household=A
and want to replicate the code for all member of the household, as given in
column=B. I wou
2 matches
Mail list logo