Skip to contents

Nest a var_grp_df by the z and y columns

Usage

var_subgroup_nest(var_grp_df, .key = "data")

Arguments

var_grp_df

the var_grp dataframe

.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

a nested dataframe with z and y columns and a .key column with the x columns nested in it

Examples

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