fits and plots KMeans clusterings on numeric columns of the dataset

explore_KMeans_clustering(
  df,
  centers = seq(from = 2, to = 10),
  iter.max = 10,
  algorithm = c("Lloyd")
)

Arguments

df

data frame: the original dataset

centers

vector of number of clusters, optional, default to seq(from = 2, to = 10)

iter.max

integer: max number of iteration, optional, default to 10

algorithm

character: may be abbreviated, optional, default to "Lloyd". Note that "Lloyd" and "Forgy" are alternative names for one algorithm

Value

a list of plots

Examples

library(palmerpenguins) explore_KMeans_clustering(penguins)
#> Warning: did not converge in 10 iterations
#> Warning: did not converge in 10 iterations
#> Warning: did not converge in 10 iterations
#> Warning: did not converge in 10 iterations
#> Warning: did not converge in 10 iterations
#> [[1]]
#> #> [[2]]
#> #> [[3]]
#> #> [[4]]
#> #> [[5]]
#> #> [[6]]
#> #> [[7]]
#> #> [[8]]
#> #> [[9]]
#>