Replaces an existing trait.
a new object descended from
LociMap-class
an integer indicating which trait to replace
a new value for varA in the base population. If NULL, the existing value is retained.
a new value for varG in the base population. If NULL, the existing value is retained.
should the check for a running simulation be ignored. Only set to TRUE if you know what you are doing.
SP$switchTrait(lociMap, trait, varA = NULL, varG = NULL, force = FALSE)