cluster_data.kmeans: Extracts cluster allocation from object of class 'kmeans'.

Description Usage Arguments Value See Also Examples

View source: R/kmeans.R

Description

Extracts the cluster allocation from a kmeans analysis into a data.frame

Usage

1
2
  ## S3 method for class 'kmeans'
 cluster_data(model, ...)

Arguments

model

object of type kmeans

...

ignored

Value

A data frame with the following columns:

cluster

Cluster allocation

See Also

cluster_data, plot_cluster

Examples

1
2
3
4
data(iris)
iris <- iris[, -5]
model <- kmeans(iris, 3)
str(cluster_data(model))

pentalibra/ggcluster documentation built on May 25, 2019, 12:46 a.m.