title: R.. Is there any way to return corresponding index number after compare two vectors?
body: <p>I've been really trying to solve it but could not figure it out.</p>
  
  <p>Let's say I have 2 data frames with 1 column each.</p>
  
  <p>For example,
  df a looks like this.
  (Numbers are row names of the values.)</p>
  
  <pre><code>1       a
  2       b
  3       c
  4       d
  5       e
  6       f
  7       g
  8       h
  9       i
  </code></pre>
  
  <p>and df b is like this (it has different length with df a).</p>
  
  <pre><code>1       o
  2       p
  3       a
  4       m
  5       g
  </code></pre>
  
  <p>What I want to do is that I want to look thru if any values in df b exist in df a and get row names(index?) of corresponding values in df a.
  So in this case, since values in df b which are 'a' and 'g' of 3rd and 5th rows exist in 1st row and 7th row, I want to get 1 and 7 as return.</p>
  
  <p>Could anyone help me on this?</p>
  
  <p>Thanks!</p>