bdsI: Sparse identity matrices

Description Usage Arguments Value Examples

View source: R/bdsI.R

Description

This function will create an identitiy matrix, in the sparse bdsmatrix format.

Usage

1
bdsI(id, blocksize)

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

blocksize

the blocksize vector of the final matrix. If supplied, the sum of blocksizes must equal the dimension of the matrix. By default, the created matrix is as sparse as possible.

Value

an identity matrix.

Examples

1
imat <- bdsI(1:10)

bdsmatrix documentation built on May 2, 2019, 4:45 p.m.

Related to bdsI in bdsmatrix...