Description Usage Arguments Details Value Copyright Author(s)
Documentation for SLiM function cachedFitness
, which is a method of the
SLiM class Subpopulation
.
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.
1 | cachedFitness(indices)
|
indices |
An object of type null or integer. See details for description. |
The fitness values calculated for the individuals at the indices given are returned. If NULL is passed, fitness values for all individuals in the subpopulation are returned. The fitness values returned are cached values; fitness() callbacks are therefore not called as a side effect of this method. It is always an error to call cachedFitness() from inside a fitness() callback, since fitness values are in the middle of being set up. In WF models, it is also an error to call cachedFitness() from a late() event, because fitness values for the new offspring generation have not yet been calculated and are undefined. In nonWF models, the population may be a mixture of new and old individuals, so instead, NAN will be returned as the fitness of any new individuals whose fitness has not yet been calculated. When new subpopulations are first created with addSubpop() or addSubpopSplit(), the fitness of all of the newly created individuals is considered to be 1.0 until fitness values are recalculated.
An object of type float.
This is documentation for a function in the SLiM software, and has been reproduced from the official manual, which can be found here: http://benhaller.com/slim/SLiM_Manual.pdf. This documentation is Copyright © 2016–2020 Philipp Messer. All rights reserved. More information about SLiM can be found on the official website: https://messerlab.org/slim/
Benjamin C Haller (bhaller@benhaller.com) and Philipp W Messer (messer@cornell.edu)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.