BlockDiagonal {fake}R Documentation

Block diagonal matrix

Description

Generates a binary block diagonal matrix.

Usage

BlockDiagonal(pk)

Arguments

pk

vector encoding the grouping structure.

Value

A binary block diagonal matrix.

See Also

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

Examples

# Example 1
BlockDiagonal(pk = c(2, 3))

# Example 2
BlockDiagonal(pk = c(2, 3, 2))

[Package fake version 1.4.0 Index]