Learn R Programming

rbioacc

Inference and Prediction of ToxicoKinetic (TK) Models

Little hack

To load all internal function of a package during dev: devtools::load_all()

A lighter package build

To make the package lighter, we have to remove the vignettes: see file .Rbuildignore

Error to recompile during package development

Sometimes, there is an Error to recompile during development after change of .stan files. A solution is to remove the rbioacc 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 rbioacc from parent directory of rbioacc.

Note

Build

pkgbuild::compile_dll() # to preform a fake R CMD install
roxygen2::roxygenize() # to update the documentation
devtools::install() 

Test and Check the package

devtools::test() 
devtools::check() 

then to build the package:

 devtools::build()

If the archive produce (rPBK_X.Y.Z.tar.gz) is in the workspace of the container (outside RPBK), then move the archive:

mv rPBK_X.Y.Z.tar.gz rPBK

Check as CRAN

R CMD check --as-cran

or from command line, but not working very well to be send to CRAN:

R CMD INSTALL --preclean --no-configure --build .
R CMD INSTALL --preclean --build .

Copy Link

Version

Install

install.packages('rbioacc')

Monthly Downloads

298

Version

1.2.1

License

MIT + file LICENSE

Maintainer

Virgile Baudrot

Last Published

February 27th, 2024

Functions in rbioacc (1.2.1)

fitTK

Posterior predictive check
df_ppc

PPC data.frame
rbioacc-package

The 'rbioacc' package.
plot.fitTK

Plotting method for fitTK objects
plot_PriorPost

Plot Posterior over Prior
quantile_table

Quantiles of parameters
plot_exposure

Plot exposure profile
plot.predictTK

Plotting method for predictTK objects
psrf

Potential Scale Reduction Factors (PSRF) of the parameters
waic

Widely Applicable Information Criterion (WAIC)
mcmcTraces

Traces of MCMC iterations
predict.fitTK

Prediction function using fitTK object
modelData

Create a list giving data and parameters to use in the model inference.
t95

Return the time at 95% depuration of the parent component
modelData_ode

Create a list giving data and parameters to use in the model inference.
.fonte

A simple implementation of to pivot_longer of tidyr
plot.bioaccMetric

Plot function for object of class bioaccMetric
replace_

Replace element of a vector
exposure_names

Retrieve exposure routes names from object
bioacc_metric

Biaccumulation metrics
Oncorhynchus_two

Data on Oncorhynchus exposition
corrMatrix

Correlations between parameters: colored matrix
df_PriorPost

Data frame of Posterior over Prior
corrPlot

Correlations between parameters: pairs plot
.index_col_exposure

Return column matching "expw", "exps", "expf", "exppw" of a data.frame
Male_Gammarus_Merged

Male Gammarus fossarum exposed to Hg spiked water. Three exposure concentrations were tested in triplicates. The duration of the accumulation phase is 4 days for 0.0000708021 and 0.000283208 \(\mu g.m L^{-1}\) exposure concentrations, and 7 days for 0.000141604 \(\mu g.m L^{-1}\) exposure concentration.
Male_Gammarus_seanine_growth

Male Gammarus pulex exposed to seanine spiked water. A single exposure concentration was tested. The duration of the accumulation phase is 1.417 days. Three metabolites were quantified. The growth of organism was included.
Exposure_Sialis_lutaria

Data on Sialis lutaria exposure time series
Internal_Sialis_lutaria

Data on Sialis lutaria internal time series
Gammarus_azoxistrobine_1d_Rosch2017

Data on Gammarus exposed to azoxistrobine
Male_Gammarus_Single

Bio-accumulation data set for Gammarus fossarum exposed to Hg spiked water.
.is_equal_rmInf

Check if two vectors x and y are equal after remove Inf
Chironomus_benzoapyrene

Data on Chironomus exposed to benzoapyrene
.index_col_metabolite

Return column matching "concX" of a data.frame where X is metabolite
Chiro_Creuzot

Data on Chironomus with several exposure routes.
equations

Equations of the mathematical model used for the fit