View source: R/craft-align-kmeans.R
align_kmeans | R Documentation |
Aligns and groups observations based on k-means clustering, enabling observation splits by cluster groups.
align_kmeans(..., data = NULL, active = NULL)
... |
Arguments passed on to
|
data |
A numeric matrix to be used by k-means. By default, it will inherit from the layout matrix. |
active |
A |
It is important to note that we consider rows as observations, meaning
vec_size(data)
/NROW(data)
must match the number of observations along the
axis used for alignment (x-axis for a vertical stack layout, y-axis for a
horizontal stack layout).
ggheatmap(matrix(rnorm(81), nrow = 9)) +
anno_top() +
align_kmeans(3L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.