slimr_output: Tell SLiM to produce easily parseable output

Description Usage Arguments Value

View source: R/slimr_output.R

Description

Use this function in a slim_block call and it will be converted in the SLiM script into code to make formatted output. This output can easily be read into R and even dynamically read during simulation runs with slim_run from the slimr package. This function should generally only be used within a slim_block call

Usage

1
slimr_output(slimr_expr, name, do_every = 1)

Arguments

slimr_expr

A SLiM expression to generate output. This can either be a SLiM expression designed to create output, such as outputFull(), or an object created in the SLiM code, in which case slimr_output will automatically concatenate it to a string and output it

name

The name to use to identify this output.

do_every

How often should the output be produced? Expressed as an integer saying how many generations to run before producing output. e.g. do_every = 10 means to output every 10 generations of the simulation.

Value

An expression with the code to be run in SLiM.


rdinnager/slimrlang documentation built on June 20, 2020, 8:17 p.m.