R - Test if a data frame row exists in an other data frame

26 Aug 2017

Test if the “vector” oldCoord is a row of the data frame newCoord

# do not use apply otherwise always TRUE
newInOld <- foreach(i = 1:nrow(newCoord), .combine='c') %dopar% {
  nrow(merge(newCoord[i,], oldCoord)) > 0 
}
[ R  data_frame  logic  ]