autoplot.kmeans {ggfortify} | R Documentation |
Autoplot cluster instances
Description
Autoplot cluster instances
Usage
## S3 method for class 'kmeans'
autoplot(object, data = NULL, colour = "cluster", ...)
Arguments
object |
Clustered instance |
data |
Original data used for clustering. Mandatory for |
colour |
line colour for points |
... |
other arguments passed to |
Value
ggplot
Examples
## Not run:
autoplot(stats::kmeans(iris[-5], 3), data = iris)
autoplot(cluster::clara(iris[-5], 3), label = TRUE)
autoplot(cluster::fanny(iris[-5], 3))
autoplot(cluster::fanny(iris[-5], 3), frame = TRUE)
autoplot(cluster::pam(iris[-5], 3), data = iris, colour = 'Species')
autoplot(cluster::pam(iris[-5], 3), data = iris, frame = TRUE, frame.type = 't')
## End(Not run)
[Package ggfortify version 0.4.17 Index]