plot_fitness_landscape_evol: Plot the fitness landscape in a 'comrad' simulation over time

View source: R/plot_fitness_landscape_evolution.R

plot_fitness_landscape_evolR Documentation

Plot the fitness landscape in a comrad simulation over time

Description

Computes the fitness landscape along the time sequence defined by generation_range in a 3D plot.

Usage

plot_fitness_landscape_evol(
  comrad_tbl,
  z_seq = NULL,
  generation_range = c(0, Inf),
  fitness_lim = c(0, get_fitness(0)),
  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().

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.

generation_range

numeric vector with length 2, supplying the first and last generation to plot from the dataset. Defaults to every generation in the table

fitness_lim

numeric vector of length 2, the plotting range for the z-axis, the fitness.

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.