arrange {dplyr} | R Documentation |
Use desc
to sort a variable in descending order. Generally,
this will not also automatically order by grouping variables.
arrange(.data, ...) arrange_(.data, ..., .dots)
.data |
A tbl. All main verbs are S3 generics and provide methods
for |
... |
Comma separated list of unquoted variable names. Use
|
.dots |
Used to work around non-standard evaluation. See
|
An object of the same class as .data
.
Data frame row names are silently dropped. To preserve, convert to an explicit variable.
Note that for local data frames, the ordering is done in C++ code which does not have access to the local specific ordering usually done in R. This means that strings are ordered as if in the C locale.
Other single.table.verbs: filter
,
mutate
, select
,
slice
, summarise
arrange(mtcars, cyl, disp) arrange(mtcars, desc(disp))