Title: | Execute Pharmacometric Models Using 'shiny' |
---|---|
Description: | Execute Nonlinear Mixed Effects (NLME) models for pharmacometrics using a 'shiny' interface. Specify engine parameters and select from different run options, including simple estimation, stepwise covariate search, bootstrapping, simulation, visual predictive check, and more. Models are executed using the 'Certara.RsNLME' package. |
Authors: | James Craig [aut, cre], Mike Talley [aut], Vitalii Nazarov [aut], Certara USA, Inc [cph, fnd] |
Maintainer: | James Craig <[email protected]> |
License: | LGPL-3 |
Version: | 3.0.1 |
Built: | 2025-01-08 05:27:31 UTC |
Source: | https://github.com/cran/Certara.RsNLME.ModelExecutor |
Used by Pirana internally to launch the Model Executor Shiny GUI.
execute_mmdlModel(metamodelFile, hostsfile)
execute_mmdlModel(metamodelFile, hostsfile)
metamodelFile |
Path to existing metamodel file |
hostsfile |
Path to hosts definitions file |
Deploys a Shiny app to execute a Certara.RsNLME
model. Returns NULL
if assigned to an object.
if (interactive()) { # Get existing mmdl file mmdl_file <- system.file("vignettesdata/OneCpt_IVInfusion.mmdl", package = "Certara.RsNLME") # Create hosts file json. Note, hosts file is automatically created by Pirana. hosts_file <- tempfile(pattern = "hosts", fileext = ".json") jsonlite::write_json( list( list(profile_name = "examplehost", cores_number = 1, os = "Windows", parallel_mode="None")), auto_unbox = TRUE, path = hosts_file ) execute_mmdlModel( mmdl_file, hosts_file ) }
if (interactive()) { # Get existing mmdl file mmdl_file <- system.file("vignettesdata/OneCpt_IVInfusion.mmdl", package = "Certara.RsNLME") # Create hosts file json. Note, hosts file is automatically created by Pirana. hosts_file <- tempfile(pattern = "hosts", fileext = ".json") jsonlite::write_json( list( list(profile_name = "examplehost", cores_number = 1, os = "Windows", parallel_mode="None")), auto_unbox = TRUE, path = hosts_file ) execute_mmdlModel( mmdl_file, hosts_file ) }
Used to execute a model developed in Certara.RsNLME
from a Shiny GUI.
modelExecutorUI( model, hosts, wd, outputfile = "shiny_dirs.txt", metamodelFileName = "temp.mmdl", fromPirana = FALSE )
modelExecutorUI( model, hosts, wd, outputfile = "shiny_dirs.txt", metamodelFileName = "temp.mmdl", fromPirana = FALSE )
model |
Model object generated from |
hosts |
One or more hosts generated from |
wd |
Working directory where the model output folders will be created.
If missing, the directory specified in the model object will be used |
outputfile |
Text file providing a list of model output subfolders generated inside |
metamodelFileName |
Name of the resulting metamodel to generate. Only applicable for Pirana. |
fromPirana |
Logical; set to |
Deploys a Shiny app to execute a Certara.RsNLME
model. Returns NULL
if assigned to an object.
if (interactive()) { model <- Certara.RsNLME::pkmodel( parameterization = "Clearance", absorption = "Intravenous", numCompartments = 2, data = Certara.RsNLME::pkData, ID = "Subject", A1 = "Amount", Time = "Act_Time", CObs = "Conc", modelName = "pk_model") modelExecutorUI(model) }
if (interactive()) { model <- Certara.RsNLME::pkmodel( parameterization = "Clearance", absorption = "Intravenous", numCompartments = 2, data = Certara.RsNLME::pkData, ID = "Subject", A1 = "Amount", Time = "Act_Time", CObs = "Conc", modelName = "pk_model") modelExecutorUI(model) }