set_sampling_freq: Set default sampling frequency

View source: R/set_sampling_freq.R

set_sampling_freqR Documentation

Set default sampling frequency

Description

Returns an appropriate sampling frequency based on the order of magnitude of nb_gens.

Usage

set_sampling_freq(nb_gens)

Arguments

nb_gens

integer, how many generations should the simulation be run for?

Details

The sampling frequency is set as follows:

  • if nb_gens < 1000, sampling frequency is set to 1 (every generation).

  • if nb_gens >= 1000, sampling frequency is set to twice the order of magnitude of nb_gens - 2. E.g. for nb_gens >= 1000, the community is sampled every 20 generations, every 200 generations for nb_gens >= 10000, etc.

Author(s)

Theo Pannetier


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