[R] R_qsort decreasing =T

David Winsemius dwinsemius at comcast.net
Sat Apr 23 21:00:48 CEST 2011

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

More information about the R-help mailing list