get_fitness_landscape: Compute the fitness along a range of trait values, given a...

View source: R/get_fitness_landscape.R

get_fitness_landscapeR Documentation

Compute the fitness along a range of trait values, given a community

Description

Computes the fitness values at every point in z_seq, given the community defined by traits_comm. This is different from get_fitness(), where the fitness is only computed for the trait values of individuals in the community.

Usage

get_fitness_landscape(
  z_seq,
  traits_comm,
  growth_rate = default_growth_rate(),
  competition_sd = default_competition_sd(),
  carrying_cap_opt = default_carrying_cap_opt(),
  carrying_cap_sd = default_carrying_cap_sd()
)

Arguments

z_seq

numeric vector, the sequence of trait values along which the fitness landscape should be computed.

traits_comm

numeric vector, the trait values of all individuals in the community for which the fitness landscape is to be computed

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.

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.

Value

a tibble with z_seq rows and columns z, fitness.

Author(s)

Théo Pannetier


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