Normalizes the input to an rxModelVars object and optionally
rewrites the model text first: adding/stripping forward
sensitivity equations (calcSens/calcSens2/calcSens3),
adding/removing the df()/dy() Jacobian block (calcJac),
dropping LHS definitions (collapseModel), or converting to an
inductive linearization model (indLin).
Usage
rxGetModel(
model,
calcSens = NULL,
calcJac = NULL,
collapseModel = NULL,
indLin = FALSE,
calcSens2 = NULL,
calcSens3 = NULL
)Arguments
- model
The model to get the model variables from. It can be: rxode2 model text (a character string,
rxModelText, or a{}expression), a function or call whose body is the model, anrxode2object, anrxModelVarsobject, anrxDllobject, or anything elserxModelVars()accepts.- calcSens
boolean indicating if rxode2 will calculate the sensitivities according to the specified ODEs. May also be a character vector of the states/parameters whose first-order sensitivities (
rx__sens_<state>_BY_<param>__) should be generated.- calcJac
boolean indicating if rxode2 will calculate the Jacobain according to the specified ODEs.
- collapseModel
boolean indicating if rxode2 will remove all LHS variables when calculating sensitivities.
- indLin
Calculate inductive linearization matrices and compile with inductive linearization support.
- calcSens2
character vector (or
NULL) requesting second-order sensitivities in addition to the first-order ones fromcalcSens. When supplied, rxode2 also generates therx__sens_<state>_BY_<p>_BY_<q>__compartments (the Hessian path), wherepranges overcalcSensandqovercalcSens2. Used, for example, for population (THETA) second-order event sensitivities.NULL(the default) skips the second-order generation.- calcSens3
character vector (or
NULL) requesting third-order sensitivities in addition to the first- and second-order ones. RequirescalcSens2to also be supplied (everycalcSens3parameter needs its own already-built second-order sensitivity compartment, from the pairing ofcalcSens2withcalcSens3, to reference – socalcSens3should be a subset ofcalcSens2, which itself should be a subset ofcalcSens, mirroring howcalcSens2is used everywhere else in rxode2 today). When supplied, generates therx__sens_<state>_BY_<p>_BY_<q>_BY_<r>__compartments, wherepranges overcalcSens,qovercalcSens2, androvercalcSens3, viarxExpandSens3_().NULL(the default) skips the third-order generation.
