I have a dataset as follows (in data.frame format):
>dataset
X Y Z Value
a c f 12
a d f 45
a c f 654
a d g 684
a c g 54
b d f 78
b c f 31
b d f 777
b c g 54
b d g 45
And I have an second data.frame with criteria:
>criteria
X Y Z
a c f
b d f
How do I apply the second matrix to the first to get, in this example, c(654, 12, 777, 68) as a result? Most of the things I've tried end up pulling out all the lines with any of the three variables matching instead of all three.
EDIT: Fixed what the result is supposed to be