appDir: a string with a directory where to store the shiny app, by default is "shinyExample". The directory appDir will be created if it does not exist.
verbose: logical specifying whether to write messages as the shiny app is generated. Defaults to TRUE.
ODE.config: model name compiled and list of parameters sent to rxSolve().
statevars: List of statevars passed to to the write.template.ui() function. This usually isn't called directly.
A PK/PD model is defined using rxode2(), and a set of parameters and initial values are defined. Then the appropriate R scripts for the shiny's user interface ui.R
and the server logic server.R are created in the directory appDir.
The function evaluates the following PK/PD model by default:
To launch the shiny app, simply issue the runApp(appDir)
R command.
Returns
None, these functions are used for their side effects.
Note
These functions create a simple, but working example of a dosing regimen simulation web application. Users may want to modify the code to experiment creating shiny applications for their specific rxode2 models.
Examples
# remove myapp when the example is completeon.exit(unlink("myapp", recursive =TRUE, force =TRUE))# create the shiny app example (template)genShinyApp.template(appDir ="myapp")# run the shiny appif(requireNamespace("shiny", quietly=TRUE)){ library(shiny)# runApp("myapp") # Won't launch in environments without browsers}