| tidy.cluster_fit | R Documentation |
This method tidies the model in a tidyclust model object, if it exists.
## S3 method for class 'cluster_fit'
tidy(x, ...)
x |
An object to be converted into a tidy |
... |
Additional arguments to tidying method. |
A tibble with one row per cluster. Columns depend on the underlying
engine but typically include .cluster and cluster-level summary
statistics such as centroid coordinates or cluster size.
# tidy() support depends on the underlying engine. For the stats engine,
# broom must be installed.
## Not run:
kmeans_fit <- k_means(num_clusters = 3) |>
set_engine("stats") |>
fit(~., mtcars)
tidy(kmeans_fit)
hclust_fit <- hier_clust(num_clusters = 3) |>
set_engine("stats") |>
fit(~., mtcars)
tidy(hclust_fit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.