Learn R Programming

RcppMLPACK (version 1.0.10-7)

mlKmeans: kmeans from MLPACK

Description

kmeans example for using MLPACK with R.

Usage

mlKmeans(X, y)

Arguments

X

data matrix.

y

number of clusters.

Value

mlKmeans returns a list with cluster assignment:

Details

This is a kmeans example using RcppMLPACK. It uses the Kmeans method in MLPACK and integrates with R.

References

MLPACK project: http://www.mlpack.org/

Examples

Run this code
# NOT RUN {
  data(trees, package="datasets")
  mlKmeans(t(trees),3)
# }

Run the code above in your browser using DataLab