| augment.cluster_fit | R Documentation | 
augment() will add column(s) for predictions to the given data.
## S3 method for class 'cluster_fit'
augment(x, new_data, ...)
| x | A  | 
| new_data | A data frame or matrix. | 
| ... | Not currently used. | 
For partition models, a .pred_cluster column is added.
A tibble::tibble() with containing new_data with columns added
depending on the mode of the model.
kmeans_spec <- k_means(num_clusters = 5) |>
  set_engine("stats")
kmeans_fit <- fit(kmeans_spec, ~., mtcars)
kmeans_fit |>
  augment(new_data = mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.