The goal of runnonmem is to run NONMEM from R. Developed and tested on a Windows environment.
# install.packages("remotes")
remotes::install_github("FelicienLL/runnonmem")
First, define where is NONMEM is installed
library(runnonmem)
options(runnonmem_nmfe_location = "C:/nmXXXXX/util/nmfeXX.bat")
Then launch a run
#If the control stream is in the working directory, just execute
runnonmem("mod001.mod")
# Or specify the project directory apart
runnonmem("mod001.mod", "/my/working/directory")
# Or full path to model object
runnonmem(file = "C:/my/working/directory.mod001.mod")
I often need to run NONMEM with the snap of a finger, without opening Pirana or something else. So a long time ago I made some messy code to achieve that. Recently, I decided to clean it and I turned it into a small proper R package. Instead of keeping it for myself, here it is.