Learn R Programming

Corbi (version 0.6-2)

submatrix: Extract a submatrix from a matrix

Description

Extract a specified submatrix from a sparse matrix rapidly

Usage

submatrix(m, rows, cols)

Arguments

m

The matrix

rows

The integer vectors of row index(es)

cols

The integer vectors of column index(es)

Value

This function will return the specified submatrix as a matrix of corresponding type.

Details

This function implements faster submatrix extraction algorithm for the CsparseMatrix class in the package Matrix.