Learn R Programming

facilitation (version 0.5.2)

mat.model.base: matrix population model

Description

Produces the Matrix Population Model matrix for a continuous time structured population model, to be applied in a linear ODE. Unlike mat.model.base, only works with a single population. If only the number of stages is provided, returns a ramdom population matrix.

Usage

mat.model.base(n = 3, Ds = runif(n, 0, 5), Gs = runif(n - 1, 0, 5),
  Rs = runif(n, 0, 5))

Arguments

n

The number of life stages. Default is 3.

Ds

An n-array with death rates for each stage.

Gs

An (n-1)-array with growth rates for each stage but the last.

Rs

Either a single reproduction rate for the oldest stage, or an n-array of reproduction rates for each stage.

Examples

Run this code
# NOT RUN {
mat <- mat.model.base(5)
mat2 <- mat.model.base(3,c(1,2,3),c(10,10),100)
# }

Run the code above in your browser using DataLab