applyTraitTradeOffs {microPop}R Documentation

Internal function to trade off one trait against another (used when assigning randomly generated strain traits)

Description

works by finding the values for each strain for par1 and par2 and then sorting them in opposite orders. This means the parameter values don't change number but they are assigned to different strains.

Usage

applyTraitTradeOffs(
  microbeNames,
  tradeOffParams,
  numPaths,
  numStrains,
  Pmats,
  resourceNames
)

Arguments

microbeNames

Vector of strings which contains the names of the microbial groups in the system e.g. c('Bacteroides','Acetogens')

tradeOffParams

(vector of two strings) - parameters to trade off against each other

numPaths

Named vector. Number of paths for each microbial group

numStrains

Integer or vector of integers. Number of strains per group

Pmats

List containing lists and matrices: [[param]][[strainName]][path,rname]

resourceNames

Vector of strings which contains the names of the resources in the system

Value

new version of Pmats where parameter values are traded off


[Package microPop version 1.6 Index]