rec <-
iris %>%
recipe(formula = Species ~ .) %>%
step_aggregate_hclust(all_numeric_predictors(),
n_clusters = 2, fun_agg = sum) %>%
prep()
rec
tidy(rec, 1)
bake(rec, new_data = NULL)
Run the code above in your browser using DataLab