[R-pkg-devel] R_orderVector1 - algo: radix, shell, or another?

Jan Gorecki j@goreck| @end|ng |rom w|t@edu@p|
Sun Sep 24 20:10:53 CEST 2023


Hi Jeff,

Yes I did. My question is about R_orderVector1 which is part of public R C
api.
Should I notice something relevant in the source of R's order?

Best
Jan

On Sun, Sep 24, 2023, 17:27 Jeff Newmiller <jdnewmil using dcn.davis.ca.us> wrote:

> Have you read the output of
>
> order
>
> entered at the R console?
>
>
> On September 24, 2023 1:38:41 AM PDT, Jan Gorecki <j.gorecki using wit.edu.pl>
> wrote:
> >Dear pkg developers,
> >
> >Are there any ways to check which sorting algorithm is being used when
> >calling `order` function? Documentation at
> >https://stat.ethz.ch/R-manual/R-devel/library/base/html/sort.html
> >says it is radix for length < 2^31
> >
> >On the other hand, I am using R_orderVector1, passing in double float
> >smaller than 2^31. Short description of it states
> >"Fast version of 1-argument case of R_orderVector".
> >Should I expect R_orderVector1 follow the same algo as R's order()? If so
> >it should be radix as well.
> >
> >
> https://github.com/wch/r-source/blob/ed51d34ec195b89462a8531b9ef30b7b72e47204/src/main/sort.c#L1133
> >
> >If there is no way to check sorting algo, could anyone describe which one
> >R_orderVector1 uses, and if there is easy API to use different ones from
> C?
> >
> >Best Regards,
> >Jan Gorecki
> >
> >       [[alternative HTML version deleted]]
> >
> >______________________________________________
> >R-package-devel using r-project.org mailing list
> >https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> --
> Sent from my phone. Please excuse my brevity.
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list