Re: [R] R_qsort decreasing =T

From: David Winsemius <dwinsemius_at_comcast.net>
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 ?

methods(sort)
sort.default # leads to
sort.int

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

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive