fail when attempting to insert a shiny app into a cached chunk

This commit is contained in:
Jonathan McPherson
2014-04-24 15:28:07 -07:00
parent 19269a20fb
commit d08a2507fa

View File

@@ -240,6 +240,8 @@ knit_print.shiny.appobj <- function(x, ...) {
"Shiny applications not supported in static R Markdown documents")
}
else {
if (isTRUE(as.logical(knitr::opts_current$get("cache"))))
stop("Shiny applications cannot be used in cached chunks.")
path <- addSubApp(x)
output <- tags$iframe(src=path, width=width, height=height,
class="shiny-frame")