View source: R/multigen_function.R
env_curve | R Documentation |
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.
env_curve(trait_values, env_value, trait_weights, k = 2, width = 0.5)
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 |
k |
a scalar giving the maximum growth rate in optimal environment |
width |
a numeric for niche breadth, constant in gaussian function |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.