I want to subset data if every value in the row is greater than the respective row in a different data frame. I also need to skip some top rows. These previous questions did
N <- nrow(A) cond <- sapply(3:N, function(i) sum(A[i,] > B[i,])==2) rbind(A[1:2,], subset(A[3:N,], cond))