get_fcl_state: Calculates FCL state

Description Usage Arguments Details Value Examples

View source: R/get_fcl_state.R

Description

Calculates FCL state

Usage

1

Arguments

N

Matrix of population abundances, where nrow = 3, and ncol = n_patch.

Details

This function calculates the food chain length state of each patch at each time step in the IGP simulation. This is used internally.

Value

numeric vector of length = n_patch. FCL state 0 = no species, 1 = B only, 2 = B + C, 2.5 = B + P, 3 = B + C + P

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# simulate abundance matrix
# nrow = n_sp = 3
# ncol = n_patch = 10
N <- matrix(rpois(3 * 10, lambda = 1), nrow = 3, ncol = 10)

# make sure abundance of C and P = 0 when abundance of B = 0
N[,N[1,] == 0] <- 0

# calculate food chain length state
get_fcl(N)

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