Description Usage Arguments Value Examples
Wraps KMeans_rcpp
to create a column that is a cluster formed from select columns in the data frame.
Clusters names are specified by capital letters.
1 | add_clusters(.data, ..., n_clusters = 4, cluster_name = "cluster")
|
.data |
dataframe |
... |
columns to cluster (tidyselect) |
n_clusters |
integer |
cluster_name |
column name |
data frame
1 2 3 4 5 6 7 8 | iris %>%
tibble::as_tibble() %>%
add_clusters(Sepal.Width, Sepal.Length, n_clusters = 3, cluster_name = "Sepal_Cluster") -> iris1
iris1
iris1 %>%
numeric_summary(original_col = Sepal.Width, bucket_col = Sepal_Cluster)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.