Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ORDER

Ordering Permutation


Description

ORDER is a generic function for computing ordering permutations.

Usage

ORDER(x, ...)
## Default S3 method:
ORDER(x, ..., na.last = TRUE, decreasing = FALSE)

Arguments

x

an object.

...

further arguments to be passed to methods.

na.last

for controlling the treatment of NAs. If TRUE, missing values in the data are put last; if FALSE, they are put first; if NA, they are removed.

decreasing

logical. Should the sort order be increasing or decreasing?

Details

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).

See Also

Examples

ORDER(rnorm(5))

zoo

S3 Infrastructure for Regular and Irregular Time Series (Z's Ordered Observations)

v1.8-10
GPL-2 | GPL-3
Authors
Achim Zeileis [aut, cre] (<https://orcid.org/0000-0003-0918-3766>), Gabor Grothendieck [aut], Jeffrey A. Ryan [aut], Joshua M. Ulrich [ctb], Felix Andrews [ctb]
Initial release
2022-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.