plot_fitness_landscape: Plot the fitness landscape at a given time in the simulation

View source: R/plot_fitness_landscape.R

plot_fitness_landscapeR Documentation

Plot the fitness landscape at a given time in the simulation

Description

Computes the fitness landscape along trait range z_seq at time generation in the simulation

Usage

plot_fitness_landscape(
  comrad_tbl,
  generation,
  z_seq = NULL,
  competition_sd,
  carrying_cap_sd
)

Arguments

comrad_tbl

a tibble containing the output of a comrad simulation, as produced by run_simulation() or read by read_comrad_tbl().

generation

numeric, a single generation step in the simulation.

z_seq

numeric vector, the sequence of trait values along which the fitness landscape should be computed. Default z_seq = NULL sets the sequence to every 0.01 between twice the minimal and maximal value in comrad_tbl

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_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.

Author(s)

Théo Pannetier


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