full = data.frame(group = c('a', 'a', 'a', 'a', 'a', 'b', 'c'), values = c(1, 2, 2, 3, 5, 3, 4))
filter = data.frame(group = c('a', 'b', 'c'), values = c(4, 3, 3))
## find rows of full where values are larger than filter for the given group
full[full$group == filter$group & full$values > filter$values, ]
prints an empty data.frame with the warning:
Warning messages: 1: In full$group == filter$group : longer object length is not a multiple of shorter object length 2: In full$values > filter$values : longer object length is not a multiple of shorter object length
I'm looking for all the rows in full
that match that criteria, to end up with:
full
> group
group values
a 5
c 4