View source: R/quadratic_forms.R
distribute_matrix_across_clusters | R Documentation |
Turns a cluster-level matrix into an element-level matrix by suitably duplicating rows or columns of the matrix.
distribute_matrix_across_clusters(
cluster_level_matrix,
cluster_ids,
rows = TRUE,
cols = TRUE
)
cluster_level_matrix |
A square matrix, whose number of rows/columns matches the number of clusters. |
cluster_ids |
A vector of cluster identifiers.
If |
rows |
Whether to duplicate rows of the |
cols |
Whether to duplicate columns of the |
The input cluster_level_matrix
has its rows/columns
duplicated so that the number of rows (if rows=TRUE
) or columns (if cols=TRUE
)
equals the length of cluster_ids
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.