Skip to contents

Plot Gap Statistic

Usage

plot_gap_stat(gap_obj, show_methods = FALSE)

Arguments

gap_obj

A tidy_gap object

show_methods

Logical; show all three k selection methods? (default: FALSE)

Value

A ggplot object.

Examples

# \donttest{
gap <- tidy_gap_stat(iris[, 1:4], max_k = 6, B = 10)
plot_gap_stat(gap)

# }