Subsetting a data frame based on key spanning several columns in another (summary) data frame
I have a data frame a with 4 identifying columns: A, B, C, D . A second data frame b , created with ddply() , contains a summary of all the values for different D s for every set of A,B,C . A third data frame c contains a subset of b with bad values that I want to delete from a . Thus, I want a subset from a , omitting all the rows identified by a combination of A,B,C that are also present in c . I can think of ways do this (ugly and inefficiently) in a loop, but, my DBA background encourages me to seek a solution that is a little bit more … direct. In code: a <- data.frame( A=rep(c('2013-10