[R] Problem with base::order

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Wed Apr 10 10:29:11 CEST 2024

В Wed, 10 Apr 2024 09:33:19 +0200
Sigbert Klinke <sigbert using wiwi.hu-berlin.de> пишет:

> decreasing=c(F,F,F)

This is only documented to work with method = 'radix':

>> For the ‘"radix"’ method, this can be a vector of length equal to
>> the number of arguments in ‘...’ and the elements are recycled as
>> necessary.  For the other methods, it must be length one.

> na.last=c(T,T,T), 

I think this is supposed to be a scalar, no matter the sort method. At
the very least, I don't see it documented to accept a logical vector,
and the C code in both src/main/sort.c and src/main/radixsort.c treats
the argument as a scalar (using asLogical(...), not LOGICAL(...) on the
R value).

Best regards,

More information about the R-help mailing list