order: The order() generic

Description Usage Arguments Note

Description

Generic for order function

Usage

1
2
order(..., na.last = TRUE, decreasing = FALSE, method = c("auto", "shell",
  "radix"))

Arguments

...

a sequence of numeric, complex, character or logical vectors, all of the same length, or a classed R object.

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 (see <e2><80><98>Note<e2><80><99>in order.)

decreasing

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 .... For the other methods, it must be length one.

method

the method to be used: partial matches are allowed. The default ("auto") implies "radix" for short numeric vectors, integer vectors, logical vectors and factors. Otherwise, it implies "shell". For details of methods "shell", "quick", and "radix", see the help for sort.

Note

Need to explicitly define this generic otherwise the implicit generic in package "base" would dispatch on ('na.last', 'decreasing', 'method').

Note that dispatching on '...' is supported starting with R 2.8.0 only.


cdeterman/generics documentation built on May 20, 2019, 8:01 p.m.