View source: R/block_structure.R
BlockMatrix | R Documentation |
Generates a symmetric block matrix of size (sum(pk)
x sum(pk)
).
The sizes of the submatrices is defined based on pk
. For each
submatrix, all entries are equal to the submatrix (block) index.
BlockMatrix(pk)
pk |
vector encoding the grouping structure. |
A symmetric block matrix.
Other block matrix functions:
BlockDiagonal()
,
BlockStructure()
# Example 1
BlockMatrix(pk = c(2, 3))
# Example 2
BlockMatrix(pk = c(2, 3, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.