Set the duration of a slimr_script
slim_script_duration(x, duration)
slimr_script object to set the duration of
Final generation number to run for this simulation
A slimr_script
object with new duration
test_sim <- slim_script(
slim_block_init_minimal(mutation_rate = 1e-6),
slim_block_add_subpops(1, 100),
slim_block(1, 20, late(), {
slimr_output(sim.outputFull(), "out", do_every = 10)
})
)
slim_script_duration(test_sim, 100)
#> <slimr_script[3]>
#> block_init:initialize() {
#> initializeMutationRate(1e-06);
#> initializeMutationType("m1", 0.5, "f", 0);
#> initializeGenomicElementType("g1", m1, 1);
#> initializeGenomicElement(g1, 0, 1e+05 - 1);
#> initializeRecombinationRate(1e-08);
#> }
#>
#> block_2:1 early() {
#> sim.addSubpop("p1", 100);
#> }
#>
#> block_3:1:100 late() {
#> {sim.outputFull() -> out}
#> }