Keyed Ordering Permutation
order2(
...,
key = identity,
na.last = TRUE,
decreasing = FALSE,
method = c("auto", "shell", "radix")
)
a sequence of numeric, complex, character or logical vectors, all of the same length, or a classed R object.
A function that takes a single argument, defaults to
identity
for controlling the treatment of NA
s.
If TRUE
, missing values in the data are put last; if
FALSE
, they are put first; if NA
, they are removed
(see ‘Note’.)
logical. Should the sort order be increasing or
decreasing? 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.
the method to be used: partial matches are allowed. The
default ("auto"
) implies "radix"
for numeric vectors,
integer vectors, logical vectors and factors with fewer than
\(2^{31}\) elements. Otherwise, it implies "shell"
.
For details of methods "shell"
, "quick"
, and "radix"
,
see the help for sort
.
An integer vector with the ordered indices of the input data