Displaying 1 result from an estimated 1 matches for "mergefac".
Did you mean:
mergefac2
2004 Feb 05
0
correction to the previously asked question (about mergin g factors)
...#39;s a test of all three. See the function definitions below.
> f1 <- factor(sample(letters[1:3], 1e4, replace=TRUE))
> f2 <- factor(sample(letters[3:5], 1e4, replace=TRUE))
> f3 <- factor(sample(letters[5:7], 1e4, replace=TRUE))
>
> system.time(for (i in 1:1e2) mf <- mergeFac(f1, f2, f3))
[1] 4.54 0.00 4.73 NA NA
> system.time(for (i in 1:1e2) mf2 <- mergeFac2(f1, f2, f3))
[1] 3.95 0.01 4.11 NA NA
> system.time(for (i in 1:1e2) mf3 <- mergeFac3(f1, f2, f3))
[1] 3.61 0.00 3.76 NA NA
> all(mf == mf2)
[1] TRUE
> all(mf == mf3)
[1] TRUE
First,...