Learn R Programming

shinystan (version 2.0.0)

launch_shinystan: ShinyStan app

Description

ShinyStan app

Usage

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

Arguments

Value

An S4 shinystan object.

See Also

as.shinystan, launch_shinystan_demo

Examples

Run this code
#######################################
# 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.

Run the code above in your browser using DataLab