rxode2 to symengine environment
Usage
rxToSE(
x,
envir = NULL,
progress = FALSE,
promoteLinSens = TRUE,
parent = parent.frame()
)
.rxToSE(x, envir = NULL, progress = FALSE)
rxFromSE(
x,
unknownDerivatives = c("forward", "central", "error"),
parent = parent.frame()
)
.rxFromSE(x)Arguments
- x
expression
- envir
default is
NULL; Environment to put symengine variables in.- progress
shows progress bar if true.
- promoteLinSens
Promote solved linear compartment systems to sensitivity-based solutions.
- parent
is the parent environment to look for R-based user functions
- unknownDerivatives
When handling derivatives from unknown functions, the translator will translate into different types of numeric derivatives. The currently supported methods are:
See also
Other Symbolic tools:
rxS()
Examples
if (requireNamespace("symengine", quietly = TRUE)) {
# rxode2 syntax -> symengine syntax
print(rxToSE("central / v * exp(-ke * t)"))
# and back
print(rxFromSE("exp(-ke*t)*central/v"))
}
#> [1] "central/v*exp(- ke*t)"
#> [1] "exp(-ke*t)*central/v"
