Given 2 data frames that are identical in terms of column names/datatypes, where some columns uniquely identify the rows, is there an efficient function/method for one data.
Here is an approach using the digest package.
library(digest)
# generate keys for each row using the md5 checksum based on first two columns
check1 <- apply(original[,1:2], 1, digest)
check2 <- apply(replacement[,1:2], 1, digest)
# set goal to original and replace rows in replacement
goal <- original
goal[check1 %in% check2,] <- replacement