Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying an environment when calling launch_shinystan #116

Open
jgabry opened this issue Feb 24, 2016 · 0 comments
Open

Allow specifying an environment when calling launch_shinystan #116

jgabry opened this issue Feb 24, 2016 · 0 comments

Comments

@jgabry
Copy link
Member

jgabry commented Feb 24, 2016

From @paul-buerkner in #109:

My idea was that launch_shinystan could have an env (or similar named) argument to specify the environment to look for the objects. With regard to brms, I wouldn't require users to specify this argument. Rather, it would be set automatically be the function calling shinystan, e.g:

launch_shiny.brmsfit <- function(x, rstudio = getOption("shinystan.rstudio"), ...) {
  y <- model.response(model.frame(x))
  y_rep <- predict(x, summary = FALSE)
  shinystan::launch_shinystan(x$fit, rstudio = rstudio, env = environment(), ...)
}

I am not sure though, if this is the best way to find y and y_rep computed within the function calling shinystan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant