This function will launch MVP app and pass along arbitrary parameters through
the ...
parameter to the application. This is done by modifying the
global environment. This function will attempt to clean up any objects placed
into the global environment on exit. If objects exist prior to calling this
function (i.e. exists(OBJECT)
returns TRUE) then the value will be reset
to it's state prior to calling run_mvp
.
Usage
run_mvp(appDir = system.file("shiny", package = "MVPapp"), ...)
Arguments
- appDir
the directory of the application to run.
- ...
shiny::runApp()
parameters,shiny::shinyApp()
parameters, or parameters to pass to the Shiny app.
Details
The settings below are not technically arguments, however when provided will toggle the app behavior:
show_debugging_msg
Logical. DefaultFALSE
. Set toTRUE
to output verbose working messages in the console, could be useful for debugging.authentication_code
DefaultNULL
. Provide a string (i.e. password) to password-lock the entire app.insert_watermark
Logical. DefaultTRUE
. Set toFALSE
to remove "For Internal Use Only" text in simulated plots.internal_version
Logical. DefaultTRUE
. Setting toFALSE
may allow generation of NCA reports when hosted on AWS with different access rights.use_bi_styling
Logical. DefaultFALSE
. Set to TRUE to insert BI logo.pw_models_path
DefaultNULL
. provide a path to source in password-gated models (see theshiny/passworded_models_example.R
for ideas, and the vignette: supply passworded models)
Note that these variables are provided internally by default and does not exist as an object - see examples below for its correct usage.
If the user wishes to run the App outside of the function (e.g. preparing for deployment on Posit Connect), this can be done by accessing inst/shiny/app.R, which is located inside the folder of where the package was installed, and set debug_mode = TRUE (and settings these options there as required).
Examples
if (FALSE) { # \dontrun{
run_mvp(insert_watermark = FALSE) # remove watermarks
run_mvp(authentication_code = "some_password") # Password-lock the site,
# could be useful in deployment
run_mvp(pw_models_path = "path/to/your/private/models.R") # see
# "passworded_models_example.R" on how to set one up
} # }