| Title: | Pharmacokinetic/Pharmacodynamic Models |
|---|---|
| Description: | Provides functions to evaluate common pharmacokinetic/pharmacodynamic models and their gradients. Compatibility updates by Renova. |
| Authors: | Anne Dubois [aut], Julie Bertand [aut], France Mentre [aut], Douglas Bates [aut, cre] |
| Maintainer: | Douglas Bates <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 0.3.2.9001 |
| Built: | 2026-11-13 17:46:47 UTC |
| Source: | https://github.com/renova-r/PKPDmodels |
Return a formula for the PK model with linear elimination according to the number of compartments, the administration form and the dosage pattern.
PKexpr(admin = c("bolus", "infusion", "oral"), dosage = c("sd", "md", "ss"), subst = list(), cpt = 1L)PKexpr(admin = c("bolus", "infusion", "oral"), dosage = c("sd", "md", "ss"), subst = list(), cpt = 1L)
admin |
form of administration of the drug, one of
|
dosage |
form of dosage, one of |
subst |
a list of formulas of substitutions to perform |
cpt |
scalar integer - the number of model compartments. |
a formula
## single-dose oral administration PKexpr("oral", "sd")## single-dose oral administration PKexpr("oral", "sd")
Create a model function with gradient evaluation (and, optionally, Hessian evaluation) for a model according to the number of compartments, the form of administration and dosage of the drug after performing any substitutions given.
PKmod(admin = c("bolus", "infusion", "oral"), dosage = c("sd", "md", "ss"), subst = list(), cpt = 1L, hessian = FALSE)PKmod(admin = c("bolus", "infusion", "oral"), dosage = c("sd", "md", "ss"), subst = list(), cpt = 1L, hessian = FALSE)
admin |
form of administration of the drug, one of
|
dosage |
type of dosage of the drug, one of
|
subst |
a list of formulas of substitutions to perform |
cpt |
scalar integer - the number of model compartments. |
hessian |
a logical value indicating whether the second derivatives should be calculated and incorporated in the return value. |
The substitutions are given as a list of formulas, such
as list(k ~ Cl/V, Cl ~ exp(lCl), V ~ exp(lV)).
They are applied left to right.
a byte-compiled model function with gradient evaluation
## return a function with substitutions PKmod("bolus", "sd", list(k ~ Cl/V, Cl ~ exp(lCl), V ~ exp(lV)))## return a function with substitutions PKmod("bolus", "sd", list(k ~ Cl/V, Cl ~ exp(lCl), V ~ exp(lV)))
Substitute the expression sub for the name
nm in expr by walking the tree.
subexpr(expr, nm, sub)subexpr(expr, nm, sub)
expr |
an expression |
nm |
a name for which to substitute |
sub |
the expression to substitute for name nm |
the expression with all occurrences of nm replaced by sub
this function is called recursively