Learn R Programming

ykmeans (version 1.0)

kmeansN: kmeansN

Description

N times run the k-means

Usage

kmeansN(x, k, variable.names = "x", target.name = "y", cluster.name = "cluster", n = 100)

Arguments

x
A data.frame
k
number of cluster
variable.names
variable names
target.name
objective variable name
cluster.name
cluster variable name
n
number of trials

Value

A data.frame

Examples

Run this code
## Not run: 
# data(actData)
# act.kmn <- kmeansN(actData, 3, paste0("x",1:17),"y")
# table(act.kmn$cluster)
# ## End(Not run)

Run the code above in your browser using DataLab