diags.f: Extract sub-diagonals of a matrix

Description Usage Arguments Value Author(s) Examples

View source: R/data.helper.functions.r

Description

I have only used it for Leslie matrix modelling. Not sure where else it would be useful.

Usage

1
diags.f(mat, diag.pos = -1)

Arguments

mat

data matrix

diag.pos

the sub-diagonal position, i.e. -1 extract the first lower subdiagonal, 0 is the main diagonal

Value

the specified diagonal as vector

Author(s)

Daniel Duplisea

Examples

1
2
3
4

duplisea/ddhelper documentation built on Nov. 4, 2019, 11:04 a.m.