Documentation for SLiM function addCustomColumn, 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.

addCustomColumn(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 701.

Adds a new data column with its name provided by columnName. The value for the column, when a given row is generated, will be produced by the code supplied in source, which is expected to return either NULL (which will write out NA), or a singleton value of any non-object type. The context parameter will be set up as a pseudo-parameter, named context, when source is called, allowing the same source code to be used to generate values for multiple data columns; you might, for example, provide the particular Subpopulation object here that you wish source to use for its calculations. This is optional; if the default value of NULL is used, then context will be NULL when source is called. See addMeanSDColumns() for a useful variant.

Author

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