Package: denim 1.2.3

Anh Phan

denim: Generate and Simulate Deterministic Compartmental Models

R package to build and simulate deterministic compartmental models that can be semi-Markovian. Length of stay in each compartment can be defined to follow a parametric distribution (d_exponential(), d_gamma(), d_weibull(), d_lognormal()) or a non-parametric distribution (nonparametric()).

Authors:Thinh Ong [aut, cph], Anh Phan [aut, cre], Marc Choisy [aut], Niels Lohman [ctb, cph], Bjoern Hoehrmann [ctb, cph], Florian Loitsch [ctb, cph], Ingo Berg [ctb, cph]

denim_1.2.3.tar.gz
denim_1.2.3.zip(r-4.7-x86_64)denim_1.2.3.zip(r-4.7-arm64)denim_1.2.3.zip(r-4.6-x86_64)denim_1.2.3.zip(r-4.6-arm64)denim_1.2.3.zip(r-4.5-x86_64)
denim_1.2.3.tgz(r-4.6-x86_64)denim_1.2.3.tgz(r-4.6-arm64)denim_1.2.3.tgz(r-4.5-x86_64)denim_1.2.3.tgz(r-4.5-arm64)
denim_1.2.3.tar.gz(r-4.7-arm64)denim_1.2.3.tar.gz(r-4.7-x86_64)denim_1.2.3.tar.gz(r-4.6-arm64)denim_1.2.3.tar.gz(r-4.6-x86_64)
denim_1.2.3.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
denim/json (API)

# Install 'denim' in R:
install.packages('denim', repos = c('https://thinhong.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/thinhong/denim/issues

Pkgdown/docs site:https://drthinhong.com

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

cpp

6.17 score 3 stars 22 scripts 410 downloads 8 exports 26 dependencies

Last updated from:439059c4a9. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK197
linux-devel-x86_64OK202
source / vignettesOK306
linux-release-arm64OK178
linux-release-x86_64OK204
macos-release-arm64OK162
macos-release-x86_64OK300
macos-oldrel-arm64OK133
macos-oldrel-x86_64OK333
windows-devel-arm64OK392
windows-devel-x86_64OK275
windows-release-arm64OK400
windows-release-x86_64OK181
windows-oldrel-x86_64OK183
wasm-releaseOK204

Exports:d_exponentiald_gammad_lognormald_weibulldenim_dslmathexprnonparametricsim

Dependencies:briocallrclicolorspacecrayondescdiffobjevaluatefsgluejsonlitelifecyclemagrittrotelpkgbuildpkgloadpraiseprocessxpsR6Rcpprlangrprojroottestthatwaldowithr

denim: deterministic model with memory
1. Simple SIR model with gamma distributed lengths of stay | 2. How the algorithm work? | 3. Waiting time distribution | 4. Multiple transitions from a compartment | 5. Additional examples | Example 1 | Example 2

Last update: 2026-01-20
Started: 2022-03-24

deSolve to denim
Migrate deSolve code to denim | Original code in deSolve | Model definition | Model configurations | Simulation | Compare output

Last update: 2025-08-01
Started: 2024-12-10

denim DSL
Model definition in denim | Denim DSL | Define a classic SIR model | Time varying transition | R list

Last update: 2025-07-30
Started: 2025-06-03

transition to multiple states
1. Transition to multiple states in denim | 2. Multinomial in denim | 2.1. Model definition | Proportion normalization | 2.2. Example model | Model definition in denim | Equivalent model definition in deSolve | Run simulation and compare | 3. Competing risks in denim | 3.1. Model definition | 3.2. Example model

Last update: 2025-07-30
Started: 2025-05-23

nonparametric distribution
Non-parametric vs parametric | Example 1 | Example 2

Last update: 2025-07-29
Started: 2025-06-03