powered by
fast Kmean clustering for 1D, 2D and 3D data
vcgKmeans(x, k = 10, iter.max = 10, getClosest = FALSE, threads = 0)
returns a list containing
cluster center
vector with cluster association for each coordinate
If getClosest=TRUE
getClosest=TRUE
vector with indices of points closest to the centers
matrix containing coordinates or mesh3d
number of clusters
maximum number of iterations
logical: if TRUE the indices of the points closest to the k-centers are sought.
integer: number of threads to use
vcgSample
require(Rvcg);require(rgl) data(humface) set.seed(42) clust <- vcgKmeans(humface,k=1000,threads=1)
Run the code above in your browser using DataLab