fortify.kmeans: Convert cluster instances to 'data.frame'

Description Usage Arguments Value Examples

View source: R/fortify_cluster.R

Description

Convert cluster instances to data.frame

Usage

1
2
## S3 method for class 'kmeans'
fortify(model, data = NULL, ...)

Arguments

model

Clustered instance

data

original dataset, if needed

...

other arguments passed to methods

Value

data.frame

Examples

1
2
3
4
5
fortify(stats::kmeans(iris[-5], 3))
fortify(stats::kmeans(iris[-5], 3), data = iris)
fortify(cluster::clara(iris[-5], 3))
fortify(cluster::fanny(iris[-5], 3))
fortify(cluster::pam(iris[-5], 3), data = iris)

sinhrks/ggfortify documentation built on May 26, 2018, 6:24 p.m.