Description Usage Arguments Examples
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()
.
1 2 3 4 5 | arrange_all(.tbl, .funs = list(), ..., .by_group = FALSE)
arrange_at(.tbl, .vars, .funs = list(), ..., .by_group = FALSE)
arrange_if(.tbl, .predicate, .funs = list(), ..., .by_group = FALSE)
|
.tbl |
A |
.funs |
List of function calls generated by Bare formulas are passed to |
... |
Additional arguments for the function calls in
|
.by_group |
If |
.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 |
1 2 3 4 5 6 7 8 9 | 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(.)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.