env_to_k: Calculate K based on environmental value

Description Usage Arguments Details Value Examples

View source: R/env_to_k.R

Description

Calculate K based on environmental value

Usage

1
env_to_k(env, k_base)

Arguments

env

Vector of environmental values. Inherited from igp_sim() function.

k_base

Mean carrying capacity K.

Details

This function adds variation to the carrying capacity based on the environment value. When the variation in the env variable is high, the carrying capacity varies between 0.5 and 1.5 * k_base, with most of the density being concentrated at the extremes. When variation in env is very low, the observed k is approximately = k_base.

This function is designed to take the df_patch$environment output from the mcbrnet::brnet() as the env argument. See the brnet() function to control the variation of environment in head waters as well as longitudinal variation of environmental values between patches.

Value

Vector of carrying capacities

Examples

1
env_to_k(env = rnorm(10), k_base = 100)

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