setAddLines
[Simulx] Add lines to the model.
Add equations to the structural model.
Usage
setAddLines(lines)
Arguments
- lines
(character) Additional lines to define.
Details
Additional equations can be added to the model file as in Simulx GUI. It is useful in case of import from Monolix or PKanalix, in order to add equations to the model, eg to compute an additional variable, without modifying the model file used for estimation.
All variables defined in the add lines will be available as an output.
See also
Examples
# Calculate AUC
initializeLixoftConnectors("monolix")
monolix_project <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "theophylline_project.mlxtran")
initializeLixoftConnectors("simulx")
importProject(monolix_project)
setAddLines("ddt_AUC = Cc")
# Calculate partial AUC
initializeLixoftConnectors("monolix")
monolix_project <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "warfarinPK_project.mlxtran")
initializeLixoftConnectors("simulx")
importProject(monolix_project)
setAddLines(c("if t<24", "deriv = Cc", "else", "deriv = 0", "end", "ddt_AUC = deriv"))