Display the optimum number of cluster for a given clustering method

get_optimk(df, method = "kmeans", kmax = 10, gap = FALSE)

Arguments

df

a data.frame

method

character, one of "kmeans", "hierarchical"

kmax

numeric, the maximum number of cluster to test

gap

logical, controls if the gap statistics have to be computed, default to FALSE

Value

a gridExtra object with ggplot2 plots