An R package for the inference of physiologically-based toxicokinetics model
Fit and simulate any kind of physiologically-based kinetic ('PBK') models whatever the number of compartments. Moreover, it allows to account for any link between pairs of compartments, as well as any link of each of the compartments with the external medium. Such generic PBK models have today applications in pharmacology (PBPK models) to describe drug effects, in toxicology and ecotoxicology (PBTK models) to describe chemical substance effects. In case of exposure to a parent compound (drug or chemical) the 'rPBK' package allows to consider metabolites, whatever their number and their phase (I, II, ...). Last but not least, package 'rPBK' can also be used for dynamic flux balance analysis (dFBA) to deal with metabolic networks.
Charles S, Gestin O, Bruset J, Lamonica D, Baudrot V, Chaumot A, et al. Generic Solving of Physiologically-based Kinetic Models in Sup- port of Next Generation Risk Assessment Due to Chemicals. Journal of Exploratory Research in Pharmacology. 2022, 00(00): 00–00. http://dx.doi.org/10.14218/JERP.2022.00043.
library("rstantools")
rstan_create_package(path = 'rPBK')
Before 'Documentation' and 'Clear and Rebuild' and within 'Configure Build Tools...' untick 'use devtools package function if available'. Keep 'Generate Configuration with Roxygen'
- to load all internal function of a package during dev:
devtools::load_all()
To make the package lighter, it is recommended to remove the vignettes: see file .Rbuildignore
Sometimes, there is an Error to recompile during development after change of .stan files.
A solution is to remove the rPBK
folder in R repository of the win-library (see the path written in the error message).
An other solution is to build the package from the terminal using R CMD -preclean INSTALL rPBK
from parent directory of rPBK
.
- S3 Object System: http://adv-r.had.co.nz/S3.html
- Google's R Style Guide: https://google.github.io/styleguide/Rguide.html
- testthat: https://github.com/r-lib/testthat
- covr: https://github.com/r-lib/covr
- to add a package
xxr
:usethis::use_package("xxr")
- to add data set
datar
:usethis::use_data(datar)