hierarchical <- function(X, method, h) {
dX <- dist(X)
tree <- hclust(dX,method=method)
clus <- cutree(tree,h=h)
return(clus)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.