This function launches the shinybrms app.

launch_shinybrms(...)

Arguments

...

Arguments passed to shiny::runApp(). For example, in order to force the shinybrms app to launch in the system's default web browser (even if using RStudio), set argument launch.browser to TRUE.

Value

TRUE (invisible).

Note

The following global options are introduced by shinybrms:

  • shinybrms.allow_upd: Mainly for internal testing purposes. A single logical value indicating whether updating a previous model fit using brms:::update.brmsfit() is allowed. Defaults to TRUE.

  • shinybrms.prog_browser: The value for the global option browser to be used for opening the Stan progress file (an HTML file). Defaults to option browser (see base::options()). Note that RStudio's default for option browser cannot be used for the Stan progress file. Therefore, shinybrms automatically redefines RStudio's default for option browser to fix this issue.

  • shinybrms.shinystan_browser: The value for the global option browser to be used for opening the shinystan app. Defaults to option browser (see base::options()). Note that RStudio's default for option browser cannot be used for opening the shinystan app from within shinybrms. Therefore, shinybrms automatically redefines RStudio's default for option browser to fix this issue.

External global options used by shinybrms are:

  • shiny.maxRequestSize (see shiny::shinyOptions()): If not specified by the user, then shinybrms uses a value of 50 * 1024^2 (corresponding to 50 MB).

  • warn (see base::options()): Set and reset internally (necessary for catching some warning messages).

  • browser (see base::options()): Set and reset internally (see above).

  • mc.cores (see base::options()): If option mc.cores is set, then the advanced option "Cores" (in the shinybrms app) defaults to the value of this option. If option mc.cores is not set, then the advanced option "Cores" defaults to the value returned by parallel::detectCores().

  • brms.backend (see brms::brm()): If option brms.backend is set, then the advanced option "Backend" (in the shinybrms app) defaults to the value of this option. If option brms.backend is not set, then the advanced option "Backend" defaults to "rstan".

Note that shinystan's global option shinystan.rstudio (see shinystan::launch_shinystan()) may not be used here as shinystan is called from an external R process where RStudio's browsers are not available.

Examples

if (interactive()) {
  launch_shinybrms(launch.browser = TRUE)
}