Displaying 4 results from an estimated 4 matches for "r_qsort".
2011 Apr 23
1
R_qsort decreasing =T
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 ?
Best,
--
View this message in context: http://r.789695.n4.nabble.com/R-qsort-decreasing-T-tp3470432p3470432.html
Sent from the R help mailing list archive at...
2011 Apr 21
0
C source code question (Robustbase edition)
...nt64_t k, knew, nl,nr, sump,sumq;
h = n / 2 + 1;
//h = n - p0 + 1;
k = (int64_t)h * (h - 1) / 2;
for (i = 0; i < n; ++i) {
y[i] = x[i];
left [i] = n - i + 1;
right[i] = (i <= h) ? n : n - (i - h);
/* the n - (i-h) is from the paper; original code had `n' */
}
R_qsort(y, 1, n); /* y := sort(x) */
nl = (int64_t)n * (n + 1) / 2;
nr = (int64_t)n * n;
knew = k + nl;/* = k + (n+1 \over 2) */
found = FALSE;
#ifdef DEBUG_qn
REprintf("qn0(): h,k= %2d,%2d; nl,nr= %d,%d\n", h,k, nl,nr);
#endif
/* L200: */
while(!found && nr - nl...
2013 Apr 03
0
R 3.0.0 is released
...xts/PrtUtil.h, and that no longer includes
R_exts/Print.h.
o Passing NULL to .C() is now an error.
o .C() and .Fortran() now warn if "single" arguments are used with
DUP = FALSE, as changes to such arguments are not returned to the
caller.
o C entry points R_qsort and R_qsort_I now have start and end as
size_t to allow them to work with longer vectors on 64-bit
platforms. Code using them should be recompiled.
o A few recently added C entry points were missing the remapping to
Rf_, notably [dpq]nbinom_mu.
o Some of the interface p...
2013 Apr 03
0
R 3.0.0 is released
...xts/PrtUtil.h, and that no longer includes
R_exts/Print.h.
o Passing NULL to .C() is now an error.
o .C() and .Fortran() now warn if "single" arguments are used with
DUP = FALSE, as changes to such arguments are not returned to the
caller.
o C entry points R_qsort and R_qsort_I now have start and end as
size_t to allow them to work with longer vectors on 64-bit
platforms. Code using them should be recompiled.
o A few recently added C entry points were missing the remapping to
Rf_, notably [dpq]nbinom_mu.
o Some of the interface p...