View source: R/execute_mmdlModel.R
execute_mmdlModel | R Documentation |
Used by Pirana internally to launch the Model Executor Shiny GUI.
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
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.