Skip to content
Prev 156170 / 398502 Next

How to find the index

On 9/16/2008 11:04 AM, Peng Jiang wrote:
You can't.  Sorting loses information, and the original index is part of 
the information that is lost.

What you should do is use order() instead of sort().  x[order(x)] is the 
same as sort(x), but no information is lost.

Duncan Murdoch