View source: R/fortify_cluster.R
fortify.silhouette | R Documentation |
cluster::silhouette
to data.frame
Convert cluster::silhouette
to data.frame
## S3 method for class 'silhouette'
fortify(model, data = NULL, ...)
model |
Silhouette instance |
data |
original dataset, if needed |
... |
other arguments passed to methods |
data.frame
## Not run:
fortify(cluster::silhouette(cluster::pam(iris[-5], 3)))
fortify(cluster::silhouette(cluster::clara(iris[-5], 3)))
fortify(cluster::silhouette(cluster::fanny(iris[-5], 3)))
mod = stats::kmeans(iris[-5], 3)
fortify(cluster::silhouette(mod$cluster, stats::dist(iris[-5])))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.