Convenience function to compute hierarchical clustering and cut the tree into k clusters
Usage
path_hcut(x, k, FUN = stats::hclust, ...)Arguments
- x
an object of class
"HeFTy","tTdiss" or"dist"(dissimilarity matrix).- k
integer. number of clusters to be generated
- FUN
hierarchical clustering function to be used, i.e. one of
stats::hclust()(the default),cluster::agnes(),cluster::diana()).- ...
optional arguments past to
hc_func
Value
an object of class "hcut" containing the result of the standard
function used (read the documentation of stats::hclust(), cluster::agnes(), cluster::diana()).
It includes also
- cluster
the cluster assignment of observations after cutting the tree
- nbclust
the number of clusters
- size
the size of clusters