Learn R Programming

IPMpack (version 1.6)

coerceMatrixIPM: Coerces a matrix population model to a IPMmatrix object.

Description

Forces a MPM (a matrix population model, or survival-growth transition matrix, or similar) into an IPMmatrix object for use with passage time, life expectancy methods, etc.

Usage

coerceMatrixIPM(amat)

Arguments

amat
A matrix population model; or subset (P matrix, F matrix) with any number of bins.

Value

  • an object of class IPMmatrix.

Examples

Run this code
# Build a simple matrix model with three classes, 
# no retrogression and stasis only in the third stage, 
# which is the only reproductive one in the life cycle.
aMat <- matrix(0, 3, 3)
aMat[cbind(2:3, 1:2)] <- 0.5
aMat[cbind(3, 3)] <- 0.8
aMat[1, 3] <-5

IPMamat <- coerceMatrixIPM(aMat)

Run the code above in your browser using DataLab