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

View source: R/fortify_cluster.R

fortify.kmeansR Documentation

Convert cluster instances to data.frame

Description

Convert cluster instances to data.frame

Usage

## 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

## Not run: 
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)

## End(Not run)

ggfortify documentation built on May 29, 2024, 7:19 a.m.