[R] sorting without order
Marc Mamin
M.Mamin at intershop.de
Tue Nov 23 10:58:14 CET 2004
Hello,
In order to increase the performance of a script I'd like to sort very large vectors containing repeated integer values.
I'm not interesting in having the values sorted, but only grouped.
I also need the equivalent of index.return from the standard "sort" function:
f(c(10,1,10,100,1,10))
=>
grouped: c(10,10,10,1,1,100)
ix: c(1,3,6,2,5,4)
is there a way to achieve this which would be faster than the standard sort function?
Thanks for any hints,
Marc Mamin
More information about the R-help
mailing list