View source: R/kmeans_segmentation.R
kmeans_segmentation | R Documentation |
runs kmeans using the stats package
kmeans_segmentation( df, vars, num_sols, iter.max = 10, nstart = 1, algorithm = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen") )
df |
data.frame of numeric variables |
vars |
character vector of variable names |
num_sols |
numeric vector specifying the minimum and maximum number of segments to extract |
iter.max |
the maximum number of iterations allowed |
nstart |
if centers is a number, how many random sets should be chosen? |
algorithm |
character: may be abbreviated. Note that "Lloyd" and "Forgy" are alternative names for one algorithm. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.