Visualize k-means clustering with various plot types.
Arguments
- x
A
stat_kmeansobject- type
Character. Type of plot:
"clusters": Cluster visualization (requires PCA projection)"withinss": Within-cluster sum of squares by cluster
- color
Column name (bare or quoted) for coloring points (for cluster plot). If NULL, colors by cluster assignment.
- labels
Column name (bare or quoted) for text labels.
- ...
Additional arguments (reserved)
Examples
if (FALSE) { # \dontrun{
km <- boteft %>% stat_kmeans(k = 3)
# Cluster plot (colored by cluster)
plot(km)
# Color by original grouping
plot(km, color = type)
# Within-cluster SS plot
plot(km, type = "withinss")
} # }
