Produces a random distribution of trait values where the mean is groupVal and the range is determined by strainOptions$percentTraitRange (if not pHtrait) and by maxPHshift if it is the pHtrait (see strainOptions)
assignStrainTraits(
numStrains,
groupVal,
strainOptions,
parName = "unspecified param",
pHtrait = FALSE,
gname = "None"
)Integer. Number of strains per group
Scalar. Group parameter value i.e. the mean parameter value
list from microPopModel inputs. Contains '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;
Name of parameter. This is only used to help with error catching
TRUE/FALSE whether or not trait is the pH trait.
Microbe name (for indexing strainOptions$percentTraitRange)
vector of values for each strain for one parameter