| kmeans {MajMinKmeans} | R Documentation | 
k-means function
Description
k-means algorithm in clustering. This function export the clustered results based on one replication of the k-means method
Usage
kmeans(x, centers, nItter = 4)
Arguments
| x | matrix of data (dim 1: samples (must be equal to dim 1 of X), dim 2: attributes (must be equal to dim 2 of X)) | 
| centers | initial seleted centroids (randomly or another method) | 
| nItter | Number of itteration function | 
Value
clustered results based on k-means methods.
Examples
{
X=rbind(matrix(rnorm(1000*2 ,4,.1),1000,2),matrix(rnorm(1000*2, 3, 0.2),1000,2))
M <- X[sample(nrow(X), 2),]
kmeans(X,M, 4)
}
[Package MajMinKmeans version 0.1.0 Index]