get_fitness: Compute fitness values

View source: R/get_fitness.R

get_fitnessR Documentation

Compute fitness values

Description

Fitness values are computed for each individual from their trait value, the fitness landscape defined by the carrying capacity parameters, and the trait values of all other individuals in the community.

Usage

get_fitness(
  traits_comm,
  growth_rate = default_growth_rate(),
  competition_sd = default_competition_sd(),
  trait_opt = default_trait_opt(),
  carrying_cap_opt = default_carrying_cap_opt(),
  carrying_cap_sd = default_carrying_cap_sd(),
  fitness_func = fitness_func_ricker
)

Arguments

traits_comm

numeric vector of variable length, the trait values of every individual in the community.

growth_rate

numeric ⁠>= 0⁠, the baseline growth rate. Generations being discrete, high values will cause chaos.

competition_sd

numeric ⁠>= 0⁠.Parameter \sigma_{\alpha} of the competition coefficient. Modulates the the strength of competition between two individuals given their distance in trait space.

trait_opt

numeric. The optimal trait value, z_{opt}. get_carrying_cap(trait_opt) = carrying_cap_opt.

carrying_cap_opt

numeric, value of the carrying capacity at trait_opt

carrying_cap_sd

numeric ⁠>= 0⁠. Parameter \sigma_K of the carrying capacity. Modulates how fast the carrying capacity decays when moving away from the optimal trait value.

fitness_func

the name of the function used to compute fitness.

Author(s)

Theo Pannetier


TheoPannetier/comrad documentation built on April 8, 2023, 8:06 a.m.