| Title: | Automated NONMEM to mrgsolve Translation |
|---|---|
| Description: | This package is intended to streamline the modeling and simulation process for PK and PK-PD applications by translating NONMEM models to mrgsolve syntax. It currently does not encompass all NONMEM use cases, and as such modifications to the output mrgsolve code may be neccessary. There is no guarantee to the accuracy of the translation. It remains the responsibility of the user to perform validation of the resulting mrgsolve code. |
| Authors: | Andrew Santulli |
| Maintainer: | Andrew Santulli <[email protected]> |
| License: | GPL (>=2) |
| Version: | 1.2.0 |
| Built: | 2026-10-17 05:11:07 UTC |
| Source: | https://github.com/Andy00000000000/nonmem2mrgsolve |
Loads the NONMEM ctl (or mod) file into R for translation to mrgsolve format.
load_ctl(filename = NULL, dir = "")load_ctl(filename = NULL, dir = "")
filename |
String of the NONMEM model name without the .ctl (or .mod) extension |
dir |
String of the directory path to the NONMEM run files |
R dataframe of the NONMEM ctl (or mod) file
# load_ctl(filename = "nonmem-model", dir = "path/to/directory/")# load_ctl(filename = "nonmem-model", dir = "path/to/directory/")
Loads the NONMEM ext file into R for capture of the final estimates.
load_ext(filename = NULL, dir = "", sigdig = -1, use.cnv = F)load_ext(filename = NULL, dir = "", sigdig = -1, use.cnv = F)
filename |
String of the NONMEM model name without the .ext extension |
dir |
String of the directory path to the NONMEM run files |
sigdig |
Numeric of the number of significant digits to round non-fixed thetas and etas to; -1 for no rounding |
use.cnv |
Logical for whether to use the NONMEM cnv file for final parameter estimates instead of the ext file ( |
R list of the NONMEM final OFV, parameter estimates, and IIV magnitudes
load_ext(filename = "nonmem-model", dir = "path/to/directory/")load_ext(filename = "nonmem-model", dir = "path/to/directory/")
Translates a NONMEM model into mrgsolve syntax using the NONMEM ctl and ext (or cnv) files.
nonmem2mrgsolve( filename = NULL, dir = NULL, sigdig = NULL, write = T, return.orig = F, out.filename = NULL, use.cnv = F )nonmem2mrgsolve( filename = NULL, dir = NULL, sigdig = NULL, write = T, return.orig = F, out.filename = NULL, use.cnv = F )
filename |
String of the NONMEM model name with or without the .ctl (or .mod) extension |
dir |
String of the directory path to the NONMEM files (if not already given in the filename input; or if the working directory was not already set) |
sigdig |
Numeric of the number of significant digits to round non-fixed thetas and etas to; default NULL for no rounding |
write |
Logical for whether to write the mrgsolve code to an R file ( |
return.orig |
Logical for whether to output the original NONMEM ctl and ext files ( |
out.filename |
String of the name for the mrgsolve output file without the .R extension |
use.cnv |
Logical for whether to use the NONMEM cnv file for final parameter estimates instead of the ext file ( |
R dataframe of the mrgsolve code
# setwd("path/to/directory") # nonmem2mrgsolve::nonmem2mrgsolve(filename = "nonmem-model.ctl")# setwd("path/to/directory") # nonmem2mrgsolve::nonmem2mrgsolve(filename = "nonmem-model.ctl")
Writes the mrgsolve code, translated from the input NONMEM run, to an R file.
writemrgsolve(mrg_code = NULL, filename = "mrgsolve_code0", dir = NULL)writemrgsolve(mrg_code = NULL, filename = "mrgsolve_code0", dir = NULL)
mrg_code |
Dataframe of the NONMEM model translated into mrgsolve code |
filename |
String of the name for the mrgsolve output file without the .R extension |
dir |
String of the directory path to the NONMEM run files |
R file of the mrgsolve code
# writemrgsolve()# writemrgsolve()