title: how to get index of sorted array elements
body: <p>Say I have an array in R    : <code>c(10, 7, 4, 3, 8, 2)</code>
  Upon sorting, this would be : <code>c(2, 3, 4, 7, 8, 10)</code></p>
  
  <p>What is the best way in R to return the indices for the sorted array elements from the original array. I'm looking for an output like : 
  <strong>6(index of 2), 4(index of 3), 3(index of 4), 2(index of 7), 5(index of 8), 1(index of 10)</strong></p>