df_nest_by | R Documentation |
Nest a tibble data frame using grouping specification. Supports standard and non standard evaluation.
df_nest_by(data, ..., vars = NULL)
data |
a data frame |
... |
One or more unquoted expressions (or variable names) separated by commas. Used as grouping variables. |
vars |
a character vector containing the grouping variables of interest. |
A tbl with one row per unique combination of the grouping variables. The first columns are the grouping variables, followed by a list column of tibbles with matching rows of the remaining columns.
# Non standard evaluation ToothGrowth %>% df_nest_by(dose, supp) # Standard evaluation ToothGrowth %>% df_nest_by(vars = c("dose", "supp"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.