title: I want to write an R function get the corresponding index of a pair of data
body: <p>I have a dataset which has 2 variables and want to write an R function as follows: If I input one pair (one row) arbitrarily from the dataset into this function, I want to extract the corresponding index of the dataset through the function.</p>
  
  <p>I used,</p>
  
  <pre><code>data = rnorm2d(10,rho = 0.4)
  x = c(data[10,1],data[10,2])
  print(match(x, data))
  </code></pre>
  
  <p>generated dataset is:</p>
  
  <pre><code>       [,1]       [,2]
  
  
  [1,] -0.1792099  1.3007178
  [2,]  0.3280193  0.6615251
  [3,] -0.4390389 -1.9611801
  [4,] -1.3096660 -0.9117184
  [5,]  0.5165317 -0.3229271
  [6,] -1.0963584 -1.1492360
  [7,]  0.3447118  0.5357070
  [8,] -0.8919166  0.4934032
  [9,] -0.2199690  0.5788579
  [10,] -0.9864628  0.6880458
  </code></pre>
  
  <p>But this gave me an output as follows:</p>
  
  <pre><code>[1] 10 20
  </code></pre>