Documentation for SLiM function addMeanSDColumns, which is a method of the SLiM class LogFile. Note that the R function is a stub, it does not do anything in R (except bring up this documentation). It will only do anything useful when used inside a slim_block function further nested in a slim_script function call, where it will be translated into valid SLiM code as part of a full SLiM script.

addMeanSDColumns(columnName, source, context)

Arguments

columnName

An object of type string or string or any. Must be of length 1 (a singleton). See details for description.

source

An object of type string or string or any. Must be of length 1 (a singleton). See details for description.

context

An object of type string or string or any. The default value is NULL. See details for description.

Value

An object of type void or void or void or void or void or void or void or void or void or void or void or void or void or void or void or void or void or void or logical.

Details

Documentation for this function can be found in the official SLiM manual: page 702.

Adds two new data columns with names of columnName_mean and columnName_sd. When a given row is generated, the code supplied in source is expected to return either a zero-length vector of any type including NULL (which will write out NA to both columns), or a non-zero-length vector of integer or float values. In the latter case, the result vector will be summarized in the two columns by its mean and standard deviation respectively. If the result vector has exactly one value, the standard deviation will be written as NA. The context parameter is set up as a pseudo-parameter when source is called, as described in addCustomColumn().

Author

Benjamin C Haller (bhaller@benhaller.com) and Philipp W Messer (messer@cornell.edu)