env_curve: Species growth rate for a given trait and environment

View source: R/multigen_function.R

env_curveR Documentation

Species growth rate for a given trait and environment

Description

Using traits that affect growth rate and specified environments, this function returns a numeric value of expected growth rates given the traits and the environmental value. The total growth rate is then the average of the growth rates computed with each trait.

Usage

env_curve(trait_values, env_value, trait_weights, k = 2, width = 0.5)

Arguments

trait_values

a numeric vector of species trait values

env_value

a single numeric value giving the environmental variable

trait_weights

data.frame with at least three columns equal to trait (giving the name of the concerned traits in traits df), growth_weight the relative weight of the trait in growth and compet_weight the relative weight of the trait in competition, both hierarchical and based on limiting similarity.

k

a scalar giving the maximum growth rate in optimal environment

width

a numeric for niche breadth, constant in gaussian function

Details

For the moment the environmental filter follows a Gaussian distribution:

R_ix = k * exp((t_i - env_x)^2/(2 * width^2))

, where t_i is trait of species i, env_x the environmental value in patch x, k a scalar giving the maximal growth rate and width the environmental breadth of species.


Rekyt/fdcoexist documentation built on Oct. 16, 2022, 10:27 a.m.