Learn R Programming

bdsmatrix (version 1.3-7)

bdsBlock: Block diagonal matrices.

Description

Create a block-diagonal matrix of ones.

Usage

bdsBlock(id, group)

Value

a block-diagonal matrix of class bdsmatrix

Arguments

id

the identifier list. This will become the dimnames of the final matrix, and must be a set of unique values. It's length determines the dimension of the final matrix

group

a vector giving the grouping structure. All rows/cols belonging to a given group will form a block of 1's in the final matrix.

See Also

bdsmatrix, bdsI