View source: R/hierarchical_segmentation.R
hierarchical_segmentation | R Documentation |
runs hierarchical clustering using hclust
hierarchical_segmentation( df, vars, dist_metric = "euclidean", linkage = "ward.D2" )
df |
data.frame of numeric variables |
vars |
character vector of variable names |
dist_metric |
name of distance metric to use. see stats::dist for more distance options |
linkage |
name of linkage method to use. see stats::hclust for more linkage options |
mydf <- data.frame(col1=c(1,2,3),col2=c(1,3,2),col3=c(1,2,1)) hierarchical_segmentation(df = mydf, vars = c("col1","col2","col3"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.