Sort With A Key
sorted(x, key = identity, decreasing = FALSE, ...)
# S3 method for default
sorted(x, key = identity, decreasing = FALSE, na.last = NA, ...)
for sort
an R object with a class or a numeric,
complex, character or logical vector. For sort.int
, a
numeric, complex, character or logical vector, or a factor.
A function that takes a single argument, defaults to
identity
logical. Should the sort be increasing or decreasing? Not available for partial sorting.
arguments to be passed to or from methods or (for the
default methods and objects without a class) to sort.int
.
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.