Re: [R] R_qsort decreasing =T

From: David Winsemius <>
Date: Sat, 23 Apr 2011 15:00:48 -0400

On Apr 23, 2011, at 2:10 PM, kv wrote:

> Hello,
> i'm using <R.h> & <Rmath.h>.
> What is the c equivalent to sort(x,deceasing=T)
> i.e. to get sort(x) i type R_qsort(x, 1, n), where
> do i set the decreasing=T flag ?
> More generally, is there a place where the
> functions in the R sources are documented ?

sort.default # leads to

So, if you look at the R code it appears that decreasing-requests are handled by first reversing the argument order before calling the .Internal code. Sometimes the code is documented in the R source.

David Winsemius, MD
West Hartford, CT

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 23 Apr 2011 - 19:03:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 23 Apr 2011 - 20:00:34 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive