assignStrainTraits: Internal function to assign stochastic strain traits

Description Usage Arguments Value

View source: R/assignStrainTraits.R

Description

Produces a random distribution of trait values where the mean is groupVal and the range is determined by percentRange (if not pHtrait) and by maxPHshift if it is the pHtrait (see strainOptions)

Usage

1
2
assignStrainTraits(numStrains, groupVal, strainOptions,
  parName = "unspecified param", pHtrait = FALSE)

Arguments

numStrains

Integer. Number of strains per group

groupVal

Scalar. Group parameter value i.e. the mean parameter value

strainOptions

List containing 'distribution' i.e. the shape of the distribution ('normal' or 'uniform'). If it is not for a pH trait and the distribution is 'normal' then its std dev is groupVal*percentRange/200, if distribution is 'uniform' then its range is groupVal*(1 +/- percentRange/100). For a pH trait, 'maxPHshift' is the max shift in pH units and 'normal' has std dev = maxPHshift/2, and 'uniform' distribution has range groupVal +/- maxPHshift;

parName

Name of parameter. This is only used to help with error catching

pHtrait

TRUE/FALSE whether or not trait is the pH trait.

Value

vector of values for each strain for one parameter


microPop documentation built on Sept. 11, 2019, 5:08 p.m.