GG_kmeans | R Documentation |
Performs kmeans and factor analysis on a dataset. Then plots a scatter plot using the first two factors (orthogonal) and color codes cases by their kmeans cluster.
GG_kmeans(df, clusters, runs = 100, standardize = T)
df |
A data.frame with variables. |
clusters |
The number of clusters to find. |
runs |
Number of runs to use. The best run is used in the plot. |
standardize |
Whether to standardize the data first. Defaults to TRUE. |
GG_kmeans(iris[-5], 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.