I have two dataframes A and B:
A
x y
1 0.0 0.0000000
2 0.5 0.8000000
3 -0.5 0.8000000
4 -1.0 0.0000000
5 -0.5 -0.8000000
6 0.5 -0.8000000
7 1.0 0.0000000
8 1.5 0.8000000
B
x y
1 -1.0 0.0000000
2 0.5 -0.8000000
3 3.0 0.0000000
I want to extract just the row indexes in A that exist in B so that the final result will be:
c(4,6)
How should I go about doing this?