arrange_all {dplyr} | R Documentation |
These scoped variants of arrange()
sort a data frame by a
selection of variables. Like arrange()
, you can modify the
variables before ordering with funs()
.
arrange_all(.tbl, .funs = list(), ...) arrange_at(.tbl, .vars, .funs = list(), ...) arrange_if(.tbl, .predicate, .funs = list(), ...)
.tbl |
A |
.funs |
List of function calls generated by Bare formulas are passed to |
... |
Additional arguments for the function calls in
|
.vars |
A list of columns generated by |
.predicate |
A predicate function to be applied to the columns
or a logical vector. The variables for which |
df <- as_tibble(mtcars) df arrange_all(df) # You can supply a function that will be applied before taking the # ordering of the variables. The variables of the sorted tibble # keep their original values. arrange_all(df, desc) arrange_all(df, funs(desc(.)))