k_means | R Documentation |
Preform a very basic k-means clustering on a dataset.
k_means(dat, numclusters, PCA = F)
dat |
numeric matrix to do kmeans to |
numclusters |
number of clusters |
PCA |
option to preform PCA on the data. |
A list containing cluster means, clustering vector, and total SSE.
iris2 <- iris %>% select(-Species) k_means(iris2, 3, pca = T) k_means(iris2, 4, pca = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.