[R] Comparing entire row sets at once efficiently

2006-09-28 Thread Dirk Eddelbuettel
Dear useRs, I am having a hard time coming up with a nice and efficient solution to a problem on entires matrices or data.frames. In spirit, this is similar to what setdiff() and setequal() do, but I need it in more dimensions. Here's a brief description. * given a set of factors or

Re: [R] Comparing entire row sets at once efficiently

2006-09-28 Thread Gabor Grothendieck
If Comparison and Candidates each have no duplicated rows (which is the situation in the example) then try this: tail(!duplicated(rbind(Comparison, Candidates)), nrow(Candidates)) On 9/28/06, Dirk Eddelbuettel [EMAIL PROTECTED] wrote: Dear useRs, I am having a hard time coming up with a

Re: [R] Comparing entire row sets at once efficiently

2006-09-28 Thread Dirk Eddelbuettel
I should have known that Gabor would reply within minutes with a nice one-line solution ... :) On 28 September 2006 at 12:05, Gabor Grothendieck wrote: | If Comparison and Candidates each have no duplicated rows (which | is the situation in the example) then try this: | |