findMatrixElements: Find row and column indices and matrix values for a vector of...

Description Usage Arguments Details Value

Description

Given a vector of element indices of a flattened vector and the flattened vector itself, find row and column indices and coefficients (matrix values) for the specified elements.

Usage

1
findMatrixElements(pvElements, pvFlatVec, pvIds = NA)

Arguments

pvElements

Vector of indices specifying elements to be searched for

pvFlatVec

Flattened vector represenation of symmetric matrix

pvIds

Optional vector of Ids, if !is.na(pvIds), then they are added to result

Details

Flattening a symmetric matrix corresponds to saving the elements of the lower (or upper) triangular part of the matrix in a defined order in a vector. Given such a flattened representation of a matrix one might search for the exact location where in the original matrix certain elements did occur. If an additional vector if IDs is specified not only indices of rows and columns but also the IDs corresponding to these row and column indices are reported in the result.

Value

lResultLoL Result list of lists with components nRowIndex, nColIndex and nCoefficient


charlotte-ngs/rgrm documentation built on May 13, 2019, 3:34 p.m.