B_extinct: Set abundances to 0 when B goes extinct

Description Usage Arguments Details Value Examples

Description

Set abundances to 0 when B goes extinct

Usage

1

Arguments

N

Community abundance matrix with nrow = n_sp = 3 and ncol = n_patch

Details

This is an internal function which sets higher trophic levels (species C and P), to 0 in a patch when the abundance of species B is 0.

Value

Abundance matrix, N.

Examples

1
2
3
4
5
6
7
8
n_sp = 3
n_patch = 5
N <- matrix(rpois(n = n_sp*n_patch, lambda = 100), nrow = n_sp, ncol = n_patch)
N
# make a few Row 1 == 0
N[1, 1:2] <- 0
N
B_extinct(N)

Jpomz/IGPtoy documentation built on Aug. 2, 2021, 5:28 a.m.