Hi,

Consider the following example:

sort(10:1, partial=3)
## 1  2  3  7  6  5  4  8  9 10

sort(10:1, index=T)
## $x: 1  2  3  4  5  6  7  8  9 10
## $ix: 10  9  8  7  6  5  4  3  2  1

sort(10:1, partial=3, index=T)
##  1  2  3  7  6  5  4  8  9 10

The first 2 calls gave expected returns; however, the third one did not
returned an index as requested. I could not find anything about it in
http://stat.ethz.ch/R-manual/R-patched/library/base/html/sort.html
<http://stat.ethz.ch/R-manual/R-patched/library/base/html/sort.html> , so it
seems to be an "undocumented feature". 

Does any body know how to "convince" sort to return index of partially
sorted array?

Thanks

Jarek
=====================================\====                 
 Jarek Tuszynski, PhD.                               o / \ 
 Science Applications International Corporation  <\__,|  
 (703) 676-4192                        ">  \
 [EMAIL PROTECTED]                   `    \



        [[alternative HTML version deleted]]

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to