title: Coordinate matching matrix's in R
body: <p>currently I have to matrixs, and I am trying to return the index values where they match in z?
  This is what I have currently </p>
  
  <pre><code>           x y
  matrixloc 0 0
            2 1
            2 3
            2 6
            5 5
            6 7
            4 9
  &gt; z
   x y
  [1,] 2 6
  [2,] 3 4
  [3,] 5 5
  [4,] 2 1
  [5,] 2 3
  [6,] 6 7  
  [7,] 4 9
  [8,] 6 8
  </code></pre>
  
  <p>currently the output I am getting is  :</p>
  
  <pre><code>     match(matrixloc,z)
    NA  1  1  1  3  6  7 NA 12  2  6  3 14 15 
  </code></pre>
  
  <p>Any suggestions on how to fix this?</p>