stan-dev / stan-dev/shinystan

Allow specifying an environment when calling launch_shinystan

Open
#116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
R
Stars
199
Forks
46
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the launch_shinystan entry point and the launch_shiny.brmsfit example quoted in the issue. Determine how an environment should be passed to locate objects computed by the calling function, and define the behavior for callers that do not supply env. Done means launch_shinystan supports the intended environment forwarding without requiring brms users to set it manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.