Bayesian Inference of Binary, Count and Continuous Data in Toxicology

Advanced methods for a valuable quantitative environmental risk assessment using Bayesian inference of several type of toxicological data. 'binary' (e.g., survival, mobility), 'count' (e.g., reproduction) and 'continuous' (e.g., growth as length, weight). Estimation procedures can be used without a deep knowledge of their underlying probabilistic model or inference methods. Rather, they were designed to behave as well as possible without requiring a user to provide values for some obscure parameters. That said, models can also be used as a first step to tailor new models for more specific situations.


morseDR

Advanced methods for a valuable quantitative environmental risk assessment using Bayesian inference with several type of ecotoxicological data: 'binary' (e.g., survival, mobility), 'count' (e.g., reproduction) and 'continuous' (e.g., growth rate, length, weight).

Install from CRAN

library(remotes)
remotes::install_gitlab("mosaic-software/morsedr", host = "gitlab.in2p3.fr")

Development

Submission

Before a submission, you can look at prepare-for-cran , which is an open and collaborative list of things you have to check before submitting your package to the CRAN.

Otherwise, check "as-cran"" using the source package:

library(devtools)
# create documentation
devtools::document(roclets = c('rd', 'collate', 'namespace'))

Once the archive is done, check that '.Rbuildignore' was applied properly. Try to have a low size archive (< 2Mb)

Either directly

# build and check the archive
devtools::check()
# not: `devtools::check(cran = TRUE)` is the default

Or in 2 steps:

# 1. build the package. 
devtools::build()
# 2. check the archive. 
devtools::check_built("../morseDR_X.Y.Z.tar.gz")

See the CRAN status of your sumbmission:

Instead of doing check and the build, we can do:

devtools::release()

Build the manual

library('devtools')
devtools::document(roclets = c('rd', 'collate', 'namespace'))
devtools::build_manual()

Coverage:

From R session

library(covr)
cov <- package_coverage("morseDR")

Style of process

The succession of steps

  1. data: load the data set.
  2. BinaryData, CountData or ContinuousData: make a ModelData object for binary, count and quantitative continuous data, respectively.
  3. The above-mentioned objects inherit of data.frame
  4. plot: plot a ModelData object.
  5. summary: provides a summary of a ModelData object.
  6. doseResponse: return a DoseResponse object.
  7. plot: plot a DoseResponse object.
  8. fit: fit a ModelData object and return a Fit object.
  9. plot: plot a Fit object.
  10. ppc: return a PPC object.
  11. plot: plot a PPC object.

Coding Style

Object: BigCamelCase

class(x) <- append("ObjectCamelCase", class(x))

Methods: small_snake_case

methods_snake_case.ObjectCamelCase <- function(...){}

Function (no methods - not linked to object): smallCamelCase

smallCamelCase <- function(...){}

Container

A docker image ready to use

The dockerfile and the following script prepared a docker image ready to use in a docker machine.

Build the Docker Image: First, ensure that you have built your Docker image using a Dockerfile. You can do this with the following command:

docker build -t setup-morsedr .

Run the Docker Image: Once the image is built, you can run it as a container using the following command:

docker run -it setup-morsedr /bin/bash

push docker image on gitlab container registry

docker login gitlab-registry.in2p3.fr

# docker build -t gitlab-registry.in2p3.fr/mosaic-software/morsedr .
# docker push gitlab-registry.in2p3.fr/mosaic-software/morsedr

docker build -t gitlab-registry.in2p3.fr/mosaic-software/morsedr/morsedr-setup .
docker push gitlab-registry.in2p3.fr/mosaic-software/morsedr/morsedr-setup
docker run -it gitlab-registry.in2p3.fr/mosaic-software/morsedr/morsedr-setup /bin/bash

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("morseDR")

0.1.3 by Virgile Baudrot, a month ago


Browse source code at https://github.com/cran/morseDR


Authors: Virgile Baudrot [aut, cre] , Sandrine Charles [aut] , Marie Laure Delignette-Muller [aut] , Nils Kehrein [ctb] , Guillaume Kon-Kam-King [ctb] , Christelle Lopes [ctb] , Philippe Veber [aut]


Documentation:   PDF Manual  


GPL (>= 3) license


Imports coda, ggplot2, grDevices, methods, rjags, stats

Suggests GGally, knitr, rmarkdown, testthat

System requirements: JAGS (>= 4.3.0)


See at CRAN