Learn R Programming

AlphaSimR (version 0.10.0)

SimParam_switchTrait: Switch trait

Description

Replaces an existing trait.

Arguments

lociMap

a new object descended from LociMap-class

trait

an integer indicating which trait to replace

varA

a new value for varA in the base population. If NULL, the existing value is retained.

varG

a new value for varG in the base population. If NULL, the existing value is retained.

force

should the check for a running simulation be ignored. Only set to TRUE if you know what you are doing.

Usage

SP$switchTrait(lociMap, trait, varA = NULL, varG = NULL, force = FALSE)