Skip to content

setdiff bizarre (was: odd behavior out of setdiff)

1 message · G. Jay Kerns

#
Jason,

(moved back to R-help)
On Sat, May 30, 2009 at 3:30 PM, Jason Rupert <jasonkrupert at yahoo.com> wrote:
Let A = your RSetDiffEntry
Let B = your RSetDuplicatesRemoved...

library(prob)
C <- setdiff(A,B)
D <- rbind(A,C)
E <- D[duplicated(D),]

The E should = your RDesired.

Hope this helps,
Jay

P.S.  I notice your row number 7 in "RSetDuplicatesRemoved" is
duplicated by the following row. That's a typo, yes?  If so, then E
should have one more row than your "RDesired."