The goal of {nonmem.utils}
is to provide a toolbox that includes helper functions, shiny apps and quarto template reports to help viewing, investigating and reporting Nonmem.
[!CAUTION] This repository is currently under development
You can install the development version of nonmem.utils like so:
remotes::install_github("pchelle/nonmem.utils")
Run the following code to open the toolbox (also available in the RStudio Addins menu):
nonmem.utils::shiny_toolbox()
Select the desired tool from the toolbox (for instance, covariate-analysis) and click on the button .
The appropriate code will be added to the R console to start the corresponding tool.
Most of the functions use the following arguments data
and meta_data
.
data
The data
argument is a data.frame that contains the data to be analyzed.
In Nonmem, the input datasets are usually provided as .csv
files. In such cases, the tools will read them using readr::read_csv()
.
data <- readr::read_csv("path/to/your/data.csv")
Nonmem output files are usually provided as .tab
files with 2 lines header. In such cases, the tools will read them using readr::read_table()
.
data <- readr::read_table("path/to/your/data.tab", skip = 1)
meta_data
The meta_data
argument is a dictionary data.frame that contains the information about the dataset.
The meta_data
is expected to be provided as .csv
files. The tools will read them using readr::read_csv()
.
meta_data <- readr::read_csv("path/to/your/dictionary.csv")
It should contain the following columns:
Name
: name of the dataset variableType
: type of the dataset variables in lower cases.
id
, occ
, time
, tad
, dv
, amt
, evid
, mdv
.cov
.cat
.eta
.Label
: displayed label of the dataset variableUnit
: displayed unit of the dataset variable
cat
), see explanations and example below.Min
: the minimum expected value of the dataset variableMax
: the maximum expected value of the dataset variableMapping between the categorical covariate values and labels can be provided in the Label
column. The jsonlite
package is leveraged to parse the mapping. As a consequence, the mapping is expected to be provided as "value":"label"
split by pipes |
.
For instance, to map a variable named sex
with 0
coding for male and 1
coding for female, the Label cell should be have the following value: