Skip to content
Prev 167057 / 398502 Next

Partial sort?

rkevinburton at charter.net wrote:
It guarantees that those particular indices are sorted correctly, but 
doesn't guarantee anything else.  For example,

 > x <- 10:1
 > sort(x, partial=1)

guarantees that the first entry in x (i.e. 10) is placed correctly, but 
nothing else, and the result is:

 [1]  1  9  8  7  6  5  4  3  2 10

Duncan Murdoch