Re: [R] efficiently diff two data frames

2013-04-19 Thread Liviu Andronic
Dear Rui, Thanks for the pointer. On Tue, Apr 16, 2013 at 8:12 PM, Rui Barradas wrote: > setdiffDF2 <- function(A, B){ > f <- function(X, Y) > !duplicated(rbind(Y, X))[nrow(Y) + 1:nrow(X)] > ix1 <- f(A, B) > ix2 <- f(B, A) > ix1 & ix2 > } > ix <- setdiffDF2(Xe, Xf) > Xe[i

Re: [R] efficiently diff two data frames

2013-04-16 Thread Rui Barradas
Hello, Maybe Petr Savicky's answer in the link https://stat.ethz.ch/pipermail/r-help/2012-February/304830.html can lead you to what you want. I've changed his function a bit in order to return a logical vector into the rows where different rows return TRUE. setdiffDF2 <- function(A, B){