> On Sep 7, 2015, at 1:20 PM, Jon BR wrote:
>
> Hi John,
> Thanks for the reply; I'm pasting here the output from dput, with a
> 'df <-' added in front:
>
> df <- structure(list(rowNum = c(1, 2, 3), first = structure(c(NA, 1L,
> 2L), .Label = c("AD=2;BA=8", "AD=9;BA=1"), class = "factor"),
Hi John,
Thanks for the reply; I'm pasting here the output from dput, with a
'df <-' added in front:
df <- structure(list(rowNum = c(1, 2, 3), first = structure(c(NA, 1L,
2L), .Label = c("AD=2;BA=8", "AD=9;BA=1"), class = "factor"),
second = structure(c(2L, 1L, NA), .Label = c("AD=1;BA=2"
I'm not making a lot of sense of the data, it looks like you want more recodes
than you have mentioned but in any case you might want to look at the recode
function in the car package. It "should" do what you want thought there may be
faster ways to do it.
BTW, for supplying sample data have
3 matches
Mail list logo