ORDER.RdORDER is a generic function for computing ordering
permutations.
ORDER(x, ...)
# Default S3 method
ORDER(x, ..., na.last = TRUE, decreasing = FALSE)ORDER is a new generic function which aims at providing
the functionality of the non-generic base function order
for arbitrary objects. Currently, there is only a default method which
simply calls order. For objects (more precisely if
is.object is TRUE) order
leverages the generic xtfrm. Thus, to assure ordering
works, one can supply either a method to xtfrm or to ORDER
(or both).
ORDER(rnorm(5))
#> [1] 1 5 2 3 4