Seamless 'Nonmem' Simulation Platform
Overview
A complete and seamless 'Nonmem' simulation interface within R. Turns 'Nonmem' control streams into simulation control streams, executes them with specified simulation input data and returns the results. The simulation is performed by 'Nonmem', eliminating manual work and risks of re-implementation of models in other tools.
New Features
- The
carry.outargument is better implemented in NMsim and NMreadSim().carry.outis used to specify what columns from the input data set to include in the simulation results (whiletable.varsis used to control what variables to include in Nonmem$TABLE). This can be supplied toNMsim(), andNMreadSim()reappliescarry.out. It is useful when performing very large simulations where a wide input data set us memory demanding to merge onto the simulation results. NMreadSim()has a new argument,reread.tmp, which can be used to force a re-read of the Nonmem outputs (in contrast to the compressed simulation results). This is especially useful if changingcarry.out.sampleCovs()can now sample with or without replacement - see new argumentreplace.sampleCovs()supports grouping for successful (parallel) simulations. This is normally only used ifsampleCovs()is used in combination withNMsim_EBE(), so if sampling from observed subjects to simulate with their empirical Bayes' estimates. This will likely lead to duplicatedIDvalues.sampleCovs()now returns a column that can be used for splitting (using saydata.table::split()) the data set into data sets without duplicatedIDvalues.sampleCovs()also offers the argumentscol.idcgrpto name the returned column andidcgrp.redistto redistribute the split to obtain (close to) equally sized splits.- The
qsubexecution path can now be specified usingNMdata::NMdataConf(), like this:
``` r
NMdata::NMdataConf(path.qsub="/path/to/qsub")
```
This should normally not be necessary, but in some setups, qsub is not in the path to executables available to the shell that executes Nonmem, using qsub if sge=TRUE. On linux, you can most often find the qsub path by opening a terminal and executing
``` shell
which qsub
Show all changes in 0.2.8Hide the rest of the changes in 0.2.8
```
Bugfixes
typicalize()(invoked byNMsim(typical=TRUE)) now drops sections with priors (like$OMEGAP,$OMEGAPD) when the parameter section (like$OMEGA) is "typicalized". This should resolve issues related to typical-subject simulations of models with between-occasion variability.NMreadSim()would not always respect thecheck.timeargument. Now fixed.- Paths would in some (not very common) cases get wrongly processed by NMsim, causing issues when reading simulation results. Fixed.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-17
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 68 (32 internal)
- Examples that run
- 59%10 run in a plain check · 7 never run
- Exported functions with examples
- 39%
- Documented parameters
- 99%
- Return-value docs
- 100%
- Help pages citing references
- 3%
Downloads
Repository
- PRs merged (all time)
- 96%
- Median days to close, 50 most recently updated closed issues
- 120
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/nmautoverse/nmsim on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-18 · The repository has a site deploy workflow
pkgdown site last built 2026-09-18
Dependencies
Installing NMsim adds 9 packages (5 with compiled code, 15 MB of source tarballs). Heaviest: data.table 5.7 MB, NMdata 5.2 MB, Rcpp 1.8 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 0.2.8Latest
- RR 4.6.0 released · 2026-04-24
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.42025-07-16 · diff ↗ ·
removed 2 exports
NMupdateSizes, prioritizePathsadded 6 exports
NMwriteFilters, NMwriteInits, NMwriteSizes, as.NMctl, modTab, readCtl - 0.2.3
- 0.2.2
- 0.2.1
- RR 4.5.0 released · 2025-04-11
- 0.2.0
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.22024-07-15 · diff ↗
Show 13 earlier eventsHide 13 earlier events
- 0.1.1
- RR 4.4.0 released · 2024-04-24
- 0.1.02024-02-22 · diff ↗
- 0.0.102024-02-09 · diff ↗ ·
removed 2 exports
is.NMsimModels, unNMsimModelsadded 2 exports
is.NMsimModTab, unNMsimModTab - 0.0.92024-02-07 · diff ↗
- 0.0.82024-02-07 · diff ↗ ·
removed 2 exports
is.NMsimTab, unNMsimTabadded 5 exports
is.NMsimModels, is.NMsimRes, simPopEtas, unNMsimModels, unNMsimRes - 0.0.7
- 0.0.62023-11-28 · diff ↗
- 0.0.5
- 0.0.42023-09-21 · diff ↗
- 0.0.32023-09-21 · diff ↗ ·
added 5 exports
NMsim_VarCov, NMsim_asis, NMsim_default, NMsim_known, NMsim_typical - 0.0.22023-09-14
- RR 4.3.0 released · 2023-04-21
Package metadata
- First published
- 2023-09-14
- Total releases
- 25 / 3 yrs
- License
- MIT + file LICENSE OSI
- Additional repositories
- mpn.metworx.com
- Minimum R
- ≥ 3.5.0
- Download size
- 1.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("NMsim")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.