hier_clust | R Documentation |
Preform hierarchical clustering on a dataset.
hier_clust(dat, k, method = "euclidean")
dat |
data for clustering (dataframe or matrix) |
k |
The number of clusters to stop clustering at |
method |
the distance measure to be used. This must be one of euclidean or manhattan. |
A vector with what was merged and in what order.
iris2 <- iris %>% select(-Species) hier_clust(iris2, k=2, method = "euclidean") hier_clust(iris2, k=3, method = "manhattan")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.