fcl_prop: Title

Description Usage Arguments Details Value Examples

View source: R/fcl_prop.R

Description

Title

Usage

1
fcl_prop(fcl)

Arguments

fcl

Vector of FCL states, output from get_fcl_state()

Details

Designed to accept the get_fcl_state() output as an input vector. fcl should only be composed of values = c(0, 1, 2, 2.5, 3)

Value

vector of length 5, with each element being the proportion of patches in that FCL state.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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
fcl_state <- get_fcl(N)
# calculate proportion of patches in a given state
fcl_prop(fcl = fcl_state)

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