View source: R/colwise-arrange.R
arrange_all | R Documentation |
Scoped verbs (_if
, _at
, _all
) have been superseded by the use of
pick()
or across()
in an existing verb. See vignette("colwise")
for
details.
These scoped variants of arrange()
sort a data frame by a
selection of variables. Like arrange()
, you can modify the
variables before ordering with the .funs
argument.
arrange_all(.tbl, .funs = list(), ..., .by_group = FALSE, .locale = NULL)
arrange_at(.tbl, .vars, .funs = list(), ..., .by_group = FALSE, .locale = NULL)
arrange_if(
.tbl,
.predicate,
.funs = list(),
...,
.by_group = FALSE,
.locale = NULL
)
.tbl |
A |
.funs |
A function |
... |
Additional arguments for the function calls in
|
.by_group |
If |
.locale |
The locale to sort character vectors in.
The C locale is not the same as English locales, such as |
.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 |
The grouping variables that are part of the selection participate in the sorting of the data frame.
df <- as_tibble(mtcars)
arrange_all(df)
# ->
arrange(df, pick(everything()))
arrange_all(df, desc)
# ->
arrange(df, across(everything(), desc))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.