Documentation for SLiM function testConstraints
, which is a method of the
SLiM class InteractionType
.
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.
testConstraints(individuals, constraints, returnIndividuals)
An object of type Individual object. See details for description.
An object of type string. Must be of length 1 (a singleton). See details for description.
An object of type logical. Must be of length 1 (a
singleton). The default value is F
. See details for description.
An object of type logical or Individual object.
Documentation for this function can be found in the official SLiM manual: page 698.
Tests the individuals in the parameter individuals against the interaction constraints specified by constraints. The value of constraints may be "receiver" to use the receiver constraints, or "exerter" to use the exerter constraints. If returnIndividuals is F (the default), a logical vector will be returned, with T values indicating that the corresponding individual satisfied the constraints, F values indicating that it did not. If returnIndividuals is T, an object vector of class Individual will be returned containing only those elements of individuals that satisfied the constraints (in the same order as individuals). Note that unlike most queries, the InteractionType does not need to have been evaluated before calling this method, and the individuals passed in need not belong to a single population or even a single species. This method can be useful for narrowing a vector of individuals down to just those that satisfy constraints. Outside the context of InteractionType, similar functionality is provided by the Subpopulation method subsetIndividuals(). Note that the use of testConstraints() is somewhat rare; usually, queries are evaluated across a vector of individuals, each of which might or might not satisfy the defined constraints. Individuals that do not satisfy constraints do not participate in interactions, so their interaction strength with other individuals will simply be zero. See the setConstraints() method to set up constraints, as well as the sexSegregation parameter to initializeInteractionType(). Note that if the constraints tested involve tag values (including tagL0 / tagL1 / tagL2 / tagL3 / tagL4), the corresponding property or properties of the tested individuals must be defined (i.e., must have been set to a value), or an error will result because the constraints cannot be applied.
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 InteractionType:
IT
,
clippedIntegral()
,
distanceFromPoint()
,
distance()
,
drawByStrength()
,
evaluate()
,
interactingNeighborCount()
,
interactionDistance()
,
localPopulationDensity()
,
nearestInteractingNeighbors()
,
nearestNeighborsOfPoint()
,
nearestNeighbors()
,
neighborCountOfPoint()
,
neighborCount()
,
setConstraints()
,
setInteractionFunction()
,
strength()
,
totalOfNeighborStrengths()
,
unevaluate()