Skip to contents

Fit Hierarchical Clustering to klassets_cluster object using stats::hclust

Usage

fit_hclust(df, k = 3, method = "complete")

Arguments

df

A klassets_cluster object.

k

A numeric determine number of clusters. This value is passed to stats::cutree method.

method

The agglomeration method to be used.

Examples


set.seed(12)

df <- sim_groups(n = 200, groups = 3)

plot(df)


dfhc <- fit_hclust(df, k = 4)

plot(dfhc)