@@ -39,7 +39,7 @@ See [package functions / modules](https://insightsengineering.github.io/teal.mod
3939### Example application
4040
4141A simple application featuring the ` tm_variable_browser() ` module:
42- ``` {r app, message = FALSE, results = "hide"}
42+ ``` {r app, message = FALSE, results = "hide", eval = requireNamespace("sparkline", quietly = TRUE) }
4343# load libraries
4444library(teal.modules.general)
4545library(teal.widgets)
@@ -78,7 +78,7 @@ shinyApp(app$ui, app$server)
7878
7979### Try it out in Shinylive
8080
81- ``` {r shinylive_url, echo = FALSE, results = 'asis'}
81+ ``` {r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive", quietly = TRUE) }
8282code <- paste0(c(
8383 knitr::knit_code$get("app"),
8484 knitr::knit_code$get("shinyapp")
@@ -88,7 +88,7 @@ url <- roxy.shinylive::create_shinylive_url(code)
8888cat(sprintf("[Open in Shinylive](%s)\n\n", url))
8989```
9090
91- ``` {r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")}
91+ ``` {r shinylive_iframe, echo = FALSE, out.width = '150%', out.extra = 'style = "position: relative; z-index:1"', eval = requireNamespace("roxy.shinylive", quietly = TRUE) && knitr::is_html_output() && identical(Sys.getenv("IN_PKGDOWN"), "true")}
9292knitr::include_url(url, height = "800px")
9393```
9494
@@ -146,7 +146,7 @@ In a `teal` app, data and modules are decoupled. In the app above:
146146- The app developer specified the module and assigned it to the ` modules ` argument.
147147- The ` init ` function took these arguments and returned a list containing ` ui ` and ` server ` object, which can be demonstrated by running:
148148
149- ``` {r, indent = " "}
149+ ``` {r, indent = " ", eval = requireNamespace("sparkline", quietly = TRUE) }
150150class(app)
151151names(app)
152152```
0 commit comments