View source: R/grouping_utils.R
| split_by_group | R Documentation |
Split a ds/y/group tibble into one tibble per group
split_by_group(df, group_col)
df |
A data frame with |
group_col |
Character scalar, the grouping column's name, or |
A named list of ds/y tibbles, one per distinct value of
group_col (names sorted), or NULL if group_col is NULL or not
present in df.
df <- data.frame(ds = as.Date("2024-01-01") + 0:3,
y = 1:4, District = c("A", "A", "B", "B"))
split_by_group(df, "District")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.