ykmeans: K-means using a target variable

Description Usage Arguments Value Author(s) Examples

Description

The clustering by k-means of using the target variable.

Usage

1
2
ykmeans(x, variable.names = "x",target.name = "y",
              k.list = 3:6,cluster.name = "cluster", n = 100)

Arguments

x

A data.frame

variable.names

variable names

target.name

objective variable name

k.list

number of cluster

cluster.name

cluster variable name

n

number of trials

Value

A data.frame

Author(s)

Yohei Sato

Examples

1
2
3
4
5
6
## Not run: 
data(actData)
act.ykm <- ykmeans(actData, paste0("x",1:17),"y",3:6)
table(act.ykm$cluster)

## End(Not run)

Example output

  1   2   3   4   5 
140  92  16 148 104 

ykmeans documentation built on May 2, 2019, 9:33 a.m.