I have two data.frames. For examples sake let's say they look like this:
df1 <- data.frame(x=rep(letters[1:26], 16))
df2 <- data.frame(y=letters[1:4])
What I would like to do is subset 'df1' to contain the rows whose first column value matches any value within the first column of 'df2'.
Now, I've tried:
subset(df1, df1$x == df2$y)
But this tells me that I need equally sized data.frames. Thoughts?