title: extract index of observation in R
body: <p>I have two vectors </p>
  
  <p>a&lt;-{1,2,5,6,7}</p>
  
  <p>b&lt;-contains mappings of above values as index of b</p>
  
  <p>I want to extract index of 'b' when it matches value of 'a' e.g. if value 2 in 'a' matches value at index 8 in 'b', then would like to extract '8'</p>
  
  <p>I am a newbie to R so is searching for solution</p>