arrange.duckplyr_df | R Documentation |
This is a method for the dplyr::arrange()
generic.
See "Fallbacks" section for differences in implementation.
arrange()
orders the rows of a data frame by the values of selected
columns.
Unlike other dplyr verbs, arrange()
largely ignores grouping; you
need to explicitly mention grouping variables (or use .by_group = TRUE
)
in order to group by them, and functions of variables are evaluated
once per data frame, not once per group.
## S3 method for class 'duckplyr_df'
arrange(.data, ..., .by_group = FALSE, .locale = NULL)
.data |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details. |
... |
< |
.by_group |
If |
.locale |
The locale to sort character vectors in.
The C locale is not the same as English locales, such as |
There is no DuckDB translation in arrange.duckplyr_df()
with .by_group = TRUE
,
providing a value for the .locale
argument,
providing a value for the dplyr.legacy_locale
option.
These features fall back to dplyr::arrange()
, see vignette("fallback")
for details.
dplyr::arrange()
library(duckplyr)
arrange(mtcars, cyl, disp)
arrange(mtcars, desc(disp))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.