| nest_arrange | R Documentation |
nest_arrange() orders the rows of nested data frames by the values of
selected columns.
nest_arrange(.data, .nest_data, ..., .by_group = FALSE)
.data |
A data frame, data frame extension (e.g., a tibble), or a lazy data frame (e.g., from dbplyr or dtplyr). |
.nest_data |
A list-column containing data frames |
... |
Variables, or functions of variables. Use |
.by_group |
If |
nest_arrange() is largely a wrapper for dplyr::arrange() and maintains
the functionality of arrange() within each nested data frame. For more
information on arrange(), please refer to the documentation in
dplyr.
An object of the same type as .data. Each object in the column .nest_data
will be also of the same type as the input. Each object in .nest_data has
the following properties:
All rows appear in the output, but (usually) in a different place.
Columns are not modified.
Groups are not modified.
Data frame attributes are preserved.
Other single table verbs:
nest_filter(),
nest_mutate(),
nest_rename(),
nest_select(),
nest_slice(),
nest_summarise()
gm_nest <- gapminder::gapminder %>% tidyr::nest(country_data = -continent)
gm_nest %>%
nest_arrange(country_data, pop)
gm_nest %>%
nest_arrange(country_data, desc(pop))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.