launch_shinystan: Launch the ShinyStan app

Description Usage Arguments Value See Also Examples

Description

Launch the ShinyStan app in the default web browser. RStudio users also have the option of launching the app in RStudio's pop-up Viewer.

Usage

1
launch_shinystan(object, rstudio = getOption("shinystan.rstudio"), ...)

Arguments

object

An object of class shinystan, stanfit, or stanreg. To use other types of objects first create a shinystan object using as.shinystan.

rstudio

Only relevant for RStudio users. The default (FALSE) is to launch the app in the user's default web browser rather than RStudio's pop-up Viewer. Users can change the default to TRUE by setting the global option options(shinystan.rstudio = TRUE).

...

Optional arguments passed to runApp.

Value

The launch_shinystan function is used for the side effect of starting the ShinyStan app, but it also returns a shinystan object, an instance of S4 class "shinystan".

See Also

as.shinystan for creating shinystan objects.

update_sso to update a shinystan object created by a previous version of the package.

launch_shinystan_demo to try a demo.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
## Not run: 
#######################################
# Example 1: 'sso' is a shinystan object
#######################################

# Just launch shinystan
launch_shinystan(sso)

# Launch shinystan and replace sso with an updated version of itself
# if any changes are made to sso while using the app
sso <- launch_shinystan(sso)

# Launch shinystan but save any changes made to sso while running the app
# in a new shinystan object sso2. sso will remained unchanged. 
sso2 <- launch_shinystan(sso) 

#######################################
# Example 2: 'sf' is a stanfit object
#######################################

# Just launch shinystan
launch_shinystan(sf)

# Launch shinystan and save the resulting shinystan object
sf_sso <- launch_shinystan(sf)

# Now sf_sso is a shinystan object and so Example 1 (above) applies when
# using sf_sso. 

#######################################
# Example 3: 'fit' is an mcmc.list, array or list of matrices
#######################################

# First create shinystan object (see ?as.shinystan for full details)
fit_sso <- as.shinystan(fit, model_name = "Example")

# Now fit_sso is a shinystan object and so Example 1 (above) applies.

## End(Not run)


Search within the shinystan package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.