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 other packages to contain examples #1458

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions R/server.R
Original file line number Diff line number Diff line change
@@ -780,6 +780,8 @@ stopApp <- function(returnValue = invisible()) {
#' @param display.mode The mode in which to display the example. Defaults to
#' \code{showcase}, but may be set to \code{normal} to see the example without
#' code or commentary.
#' @param package The name of the package that contains \code{example}. Defaults to
#' shiny package.
#'
#' @examples
#' ## Only run this example in interactive R sessions
@@ -799,8 +801,9 @@ runExample <- function(example=NA,
launch.browser=getOption('shiny.launch.browser',
interactive()),
host=getOption('shiny.host', '127.0.0.1'),
display.mode=c("auto", "normal", "showcase")) {
examplesDir <- system.file('examples', package='shiny')
display.mode=c("auto", "normal", "showcase"),
package='shiny') {
examplesDir <- system.file('examples', package)
dir <- resolve(examplesDir, example)
if (is.null(dir)) {
if (is.na(example)) {
5 changes: 4 additions & 1 deletion man/runExample.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.