Learn R Programming

shinystan (version 2.1.0)

deploy_shinystan: Deploy a ShinyStan app on the web using shinyapps.io by RStudio

Description

Requires a (free or paid) shinyapps.io account. Visit http://www.shinyapps.io/ to sign up and for details on how to configure your account on your local system using RStudio's rsconnect package.

Usage

deploy_shinystan(sso, appName, account = NULL, ...)

Arguments

Details

In ..., the arguments ppcheck_data and ppcheck_yrep can be specified. ppcheck_data should be a vector of observations to use for graphical posterior predictive checking and ppcheck_yrep should be a character string naming the parameter in sso containing the posterior predictive simulations/replications. The value of ppcheck_yrep is only used to preselect the appropriate parameter/generated quantity to use for the posterior predictive checking. ppcheck_yrep (but not ppcheck_data) can also be set interactively on shinyapps.io when using the app.

Examples

Run this code
# For this example assume sso is the name of the shinystan object for 
# the model you want to use. Assume also that you want to name your app 
# 'my-model' and that your shinyapps.io username is 'username'. 

deploy_shinystan(sso, appName = "my-model", account = "username") 

# If you only have one ShinyApps account configured then you can also omit 
# the 'account' argument. 

deploy_shinystan(sso, appName = "my-model")

Run the code above in your browser using DataLab