Learn R Programming

refund (version 0.1-40)

shift_and_shorten_matrix: Extract row-wise windows from a matrix

Description

For each row of a matrix, extracts elements at indices specified by the corresponding row of `windows`. Used for `ff()` terms with integration limits to reduce matrix size by keeping only the relevant integration region.

Usage

shift_and_shorten_matrix(X, windows)

Value

Matrix with same number of rows as `X` and same number of columns as columns in `windows`.

Arguments

X

Matrix to extract windows from.

windows

Integer matrix where each row specifies column indices to extract from the corresponding row of `X`.