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.
cachedFitness(indices)
An object of type null or integer. See details for description.
An object of type float.
Documentation for this function can be found in the official SLiM manual: page 738.
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; mutationEffect() and fitnessEffect() callbacks are therefore not called as a side effect of this method. It is always an error to call cachedFitness() from inside a mutationEffect() or fitnessEffect() 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.
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/
Other Subpopulation:
Subpopulation
,
addCloned()
,
addCrossed()
,
addEmpty()
,
addRecombinant()
,
addSelfed()
,
addSpatialMap()
,
configureDisplay()
,
defineSpatialMap()
,
outputMSSample()
,
outputSample()
,
outputVCFSample()
,
pointDeviated()
,
pointInBounds()
,
pointPeriodic()
,
pointReflected()
,
pointStopped()
,
pointUniform()
,
removeSpatialMap()
,
removeSubpopulation()
,
sampleIndividuals()
,
setCloningRate()
,
setMigrationRates()
,
setSelfingRate()
,
setSexRatio()
,
setSpatialBounds()
,
setSubpopulationSize()
,
spatialMapColor()
,
spatialMapImage()
,
spatialMapValue()
,
subsetIndividuals()
,
takeMigrants()