I have two data frames...
> dim(df.x)
[1] 2120 5
> dim(df.y)
[1] 125 3
I'd like to identify records in data frame x that match data frame y for both variable 1 and variable 2 (but not for any other variables). I suppose the typical way to do this in a lot of languages would be to do nested for statements and to compare each record in x to each record in y and stop and index the hits. But I'm wondering if there's a more efficient way to do this in R.
(I'd prefer to stick to base R or "out-of-the-box" R, if possible, rather than some of the higher-level packages.)