Hi,
Have you looked at the compare package? It might do what you want (I
just remember seeing its description on R News recently but I've never
used it),
d <- data.frame(x=1:10,y=sin(1:10),z=factor(letters[1:10]))
d1 <- d
d1$x[2:3] <- jitter(d$x[2:3] )
d2 <- subset(d1, !(z %in% c("a","g")
Hi: you've got to create a setdiff in both directions in order to get the
lone ones in each column because setdiff is
not commutative meaning that setdiff(a,b) does not equal setdiff(b,a). once
you do that, then
( setdiff1 + setdiff2 - intersect ) should equal the union.
if it
2 matches
Mail list logo