[R] Unexpected results from sort function when partial and index are used

2004-11-03 Thread Tuszynski, Jaroslaw W.
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;

Re: [R] Unexpected results from sort function when partial and index are used

2004-11-03 Thread Sundar Dorai-Raj
Tuszynski, Jaroslaw W. wrote: 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

Re: [R] Unexpected results from sort function when partial and index are used

2004-11-03 Thread Prof Brian Ripley
On Wed, 3 Nov 2004, Tuszynski, Jaroslaw W. wrote: 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