Learn R Programming

fake (version 1.4.0)

BlockStructure: Block structure

Description

Generates a symmetric matrix of size (length(pk) x length(pk)) where entries correspond to block indices. This function can be used to visualise block indices of a matrix generated with BlockMatrix.

Usage

BlockStructure(pk)

Value

A symmetric matrix of size length(pk)).

Arguments

pk

vector encoding the grouping structure.

See Also

Other block matrix functions: BlockDiagonal(), BlockMatrix()

Examples

Run this code
# Example 1
BlockMatrix(pk = c(2, 3))
BlockStructure(pk = c(2, 3))

# Example 2
BlockMatrix(pk = c(2, 3, 2))
BlockStructure(pk = c(2, 3, 2))

Run the code above in your browser using DataLab