Skip to contents

Nest a var_grp_df by the z columns

Usage

var_group_nest(var_grp_df, .subgroup = FALSE, .key = "data")

Arguments

var_grp_df

the var_grp dataframe

.subgroup

in the nested data frames also group the y columns

.key

The name of the resulting nested column. Only applicable when ... isn't specified, i.e. in the case of df %>% nest(.by = x).

If NULL, then "data" will be used by default.

Value

aa nested dataframe with z columns and a .key column with the y and x columns nested in it. The nested data will be grouped by y columns.

Examples

tmp = iris %>% dplyr::group_by(Species) %>% var_group(. ~ Petal.Width + Sepal.Width)
tmp2 = tmp %>% var_group_nest()