pmxdchk is an open-source R package (part of the pharmaverse) for checking the quality of NONMEM-style and ADPPK pharmacometric datasets before modeling. It provides:
run_nmpk_checks(), that runs the same checks from a script.https://pharmaverse.github.io/pmxdchk/
No installation needed. The demo runs entirely in your browser (WebAssembly): data you load are not uploaded to any server. The first load takes about a minute. Click Example with issues, Confirm mapping, then Run checks.
# Install the development version from GitHub
# install.packages("pak")
# pak::pak("pharmaverse/pmxdchk")
install.packages("pmxdchk", repos = c('https://pharmaverse.r-universe.dev', 'https://cloud.r-project.org'))
library(pmxdchk)
run_app()
.csv, .txt, .dat) or load a built-in example, confirm the variable mapping and the inferred study type, and run the checks. CDISC ADPPK names such as USUBJIDN, AFRLT, and WTBL are mapped to NONMEM names automatically.The app runs locally: your data stay on your machine.
library(pmxdchk)
findings <- run_nmpk_checks(
adppk_corrupted,
mapping = c(ID = "USUBJIDN", TIME = "AFRLT", NTIME = "NFRLT", WT = "WTBL"),
study_type = c("All", "Multiple Dose")
)
findings[findings$status == "flag", c("check_id", "severity", "message")]
# The rule and guidance of every check
check_catalogue()
Two example datasets are included: adppk_example (from pharmaverseadam) and adppk_corrupted, the same data with known issues injected.
docs/check_reference.html — what each check flags, generated from the package (dev/make_check_reference.R).NEWS.md — changes..xpt) files.CORE-SRC-*).devtools::load_all()
devtools::test()
The package is a golem application. Each check domain has a R/checks_<domain>.R file of pure functions with matching tests in tests/testthat/; checks are registered, with their rule and guidance, in R/check_registry.R. The Shiny modules are in R/mod_*.R.
dev/make_shinylive.R builds a browser-only copy of the app (WebAssembly, no server) for static hosting; the shinylive workflow publishes it to GitHub Pages.