Skip to content

Commit

Permalink
get launch_shinystan_demo working without loading package
Browse files Browse the repository at this point in the history
  • Loading branch information
jgabry committed Aug 31, 2016
1 parent 8aeeef8 commit 8e49068
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
### Version 2.2.1
* Better compatibility with latest releases of 'shinyjs' and 'DT' packages
* `shinystan::launch_shinystan_demo()` now works without first having to load
the package with a call to `library`

### Version 2.2.0-1
* Fix bug in `deploy_shinystan` preventing some ShinyStan apps from being deployed
* Fix bug in `deploy_shinystan` preventing some ShinyStan apps from being
deployed

### Version 2.2.0
* Add optional argument `pars` to the `as.shinystan` method for stanfit objects,
Expand Down
4 changes: 2 additions & 2 deletions R/launch_shinystan.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ launch_shinystan_demo <- function(demo_name = "eight_schools",
rstudio = getOption("shinystan.rstudio"),
...) {
demo_name <- match.arg(demo_name)
demo_object <- get(demo_name)
invisible(launch(demo_object, rstudio = rstudio, ...))
data(list = demo_name, package = "shinystan", envir = environment())
invisible(launch(get(demo_name, inherits = FALSE), rstudio = rstudio, ...))
}

# Internal launch function
Expand Down

0 comments on commit 8e49068

Please sign in to comment.