plot_outcome_core: Plot simulation outcome

View source: R/plot_outcome_core.R

plot_outcome_coreR Documentation

Plot simulation outcome

Description

Plots an overview of a simulation outcome. Shows at least trait density plots through time, and different locus-level plots depending on the option. The locus-level plots show allele frequencies, Fst, Qst, Cst and average mutational effect. Plots are facetted by trait. The time window to plot can be set.

Usage

plot_outcome_core(
  root,
  from = NULL,
  to = NULL,
  by = 1,
  true_start = NULL,
  full = FALSE,
  approx = NULL
)

Arguments

root

Path to the simulation folder

from, to

Range of time points to plot (defaults to the whole range)

by

Frequency of time points to sub-sample when plotting locus-specific lines. Defaults to 1, all time points are plotted. Use e.g. 100 to plot every 100 generations.

true_start

Shifts the time points by some amount. For example, if an extra simulation was run with 1,000 generations to record the beginning of the burn-in with a high resolution of a simulation that would otherwise be 20,000 generation-long in burn-in time, use true_start = -20000.

full

Whether to plot the full figure, i.e. with all locus-specific plots and not just the trait density plots and the average mutational effect plots.

approx

Path to pass to add_approx. Leave NULL for no overlay approximation plot.

Details

Details about how the function works.

Value

A patchwork

Note

To keep in mind

See Also

read_individuals, read_loci, read_traits, plot_traits, plot_loci_tt, plot_density, add_line, add_approx

Examples


## Not run: 

root <- system.file("extdata", "sim-example", package = "speciomer")
plot_outcome_core(root)


## End(Not run)


rscherrer/speciomer documentation built on March 11, 2023, 5:37 p.m.