kmeans_segmentation: runs kmeans using the stats package

View source: R/kmeans_segmentation.R

kmeans_segmentationR Documentation

runs kmeans using the stats package

Description

runs kmeans using the stats package

Usage

kmeans_segmentation(
  df,
  vars,
  num_sols,
  iter.max = 10,
  nstart = 1,
  algorithm = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen")
)

Arguments

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.


PrenolanM/rsegmenter documentation built on Aug. 7, 2022, 8:56 p.m.