I want to know the index of the rows in A that match rows in B.
Both A and B are data frames. For simplicity just assume:
a1 <- data.frame(a = 1:5, b=letters[1:5])
a2 <- data.frame(a = 1:3, b=letters[1:3])
In this case it's supposed to return 1,2,3.
My full dataset has 500k rows and 18 columns.