R/slimr_blocks.R
slim_block_progress.Rd
Insert slim_block to track progress when using slim_run
slim_block_progress(update_every = 1, time_counter = community.tick)
How often to update progress, expressed as the number of generations after which an update should be tracked.
A SLiM expression that returns the current time. Default is `community.tick`, which is the best option for SLiM version >4.0. If you are using SLiM version < v4.0, `sim.generation` should work.
A slimr_block
object
slim_script(
slim_block_init_minimal(),
slim_block_progress(10),
slim_block_finish(100)
)
#> <slimr_script[3]>
#> block_init:initialize() {
#> initializeMutationRate(1e-07);
#> initializeMutationType("m1", 0.5, "f", 0);
#> initializeGenomicElementType("g1", m1, 1);
#> initializeGenomicElement(g1, 0, 1e+05 - 1);
#> initializeRecombinationRate(1e-08);
#> }
#>
#> block_2:1:100 late() {
#> {community.tick -> progress}
#> }
#>
#> block_3:100 early() {
#> sim.simulationFinished();
#> }