diff --git a/vignettes/teal-modules-general.Rmd b/vignettes/teal-modules-general.Rmd index 6969a0695..b640cf1fd 100644 --- a/vignettes/teal-modules-general.Rmd +++ b/vignettes/teal-modules-general.Rmd @@ -39,7 +39,7 @@ See [package functions / modules](https://insightsengineering.github.io/teal.mod ### Example application A simple application featuring the `tm_variable_browser()` module: -```{r app, message = FALSE, results = "hide"} +```{r app, message = FALSE, results = "hide", eval = requireNamespace("sparkline")} # load libraries library(teal.modules.general) library(teal.widgets) @@ -78,7 +78,7 @@ shinyApp(app$ui, app$server) ### Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("app"), knitr::knit_code$get("shinyapp") diff --git a/vignettes/using-association-plot.Rmd b/vignettes/using-association-plot.Rmd index b303ff9b7..546abd049 100644 --- a/vignettes/using-association-plot.Rmd +++ b/vignettes/using-association-plot.Rmd @@ -304,7 +304,7 @@ shinyApp(app$ui, app$server, options = list(height = 1024, width = 1024)) ## 5 - Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), diff --git a/vignettes/using-cross-table.Rmd b/vignettes/using-cross-table.Rmd index 73c823003..cf18c4609 100644 --- a/vignettes/using-cross-table.Rmd +++ b/vignettes/using-cross-table.Rmd @@ -147,7 +147,7 @@ shinyApp(app$ui, app$server, options = list(height = 1024, width = 1024)) ## 5 - Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), diff --git a/vignettes/using-data-table.Rmd b/vignettes/using-data-table.Rmd index 686f61b14..834b3b13f 100644 --- a/vignettes/using-data-table.Rmd +++ b/vignettes/using-data-table.Rmd @@ -117,7 +117,7 @@ shinyApp(app$ui, app$server, options = list(height = 1024, width = 1024)) ## 5 - Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), diff --git a/vignettes/using-outliers-module.Rmd b/vignettes/using-outliers-module.Rmd index 1d6ca8536..093344c99 100644 --- a/vignettes/using-outliers-module.Rmd +++ b/vignettes/using-outliers-module.Rmd @@ -198,7 +198,7 @@ shinyApp(app$ui, app$server, options = list(height = 1024, width = 1024)) ## 5 - Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), diff --git a/vignettes/using-regression-plots.Rmd b/vignettes/using-regression-plots.Rmd index 94c8aac14..bb81426e0 100644 --- a/vignettes/using-regression-plots.Rmd +++ b/vignettes/using-regression-plots.Rmd @@ -277,7 +277,7 @@ shinyApp(app$ui, app$server, options = list(height = 1024, width = 1024)) ## 5 - Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), diff --git a/vignettes/using-response-plot.Rmd b/vignettes/using-response-plot.Rmd index f8054e4c8..48634b0cc 100644 --- a/vignettes/using-response-plot.Rmd +++ b/vignettes/using-response-plot.Rmd @@ -386,7 +386,7 @@ shinyApp(app$ui, app$server, options = list(height = 1024, width = 1024)) ## 5 - Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), diff --git a/vignettes/using-scatterplot-matrix.Rmd b/vignettes/using-scatterplot-matrix.Rmd index c89490ad4..57b2aab5d 100644 --- a/vignettes/using-scatterplot-matrix.Rmd +++ b/vignettes/using-scatterplot-matrix.Rmd @@ -165,7 +165,7 @@ shinyApp(app$ui, app$server, options = list(height = 1024, width = 1024)) ## 5 - Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), diff --git a/vignettes/using-scatterplot.Rmd b/vignettes/using-scatterplot.Rmd index bd28df325..4d5e273ee 100644 --- a/vignettes/using-scatterplot.Rmd +++ b/vignettes/using-scatterplot.Rmd @@ -21,7 +21,7 @@ various types of datasets using the scatter plot module `tm_g_scatterplot()`: ## 1 - Load libraries -```{r library, echo=TRUE, message=FALSE, warning=FALSE, results="hide"} +```{r library, echo=TRUE, message=FALSE, warning=FALSE, results="hide", eval = requireNamespace("ggpmics") && requireNamespace("ggExtra") && requireNamespace("colourpicker")} library(teal.modules.general) # used to create the app library(dplyr) # used to modify data sets library(ggpmisc) @@ -38,7 +38,7 @@ Inside this app 4 datasets will be used 3. `ADTTE` A long data set with time to event data 4. `ADLB` A long data set with lab measurements for each subject -```{r data, echo=TRUE, message=FALSE, warning=FALSE, results="hide"} +```{r data, echo=TRUE, message=FALSE, warning=FALSE, results="hide", eval = requireNamespace("ggpmics") && requireNamespace("ggExtra") && requireNamespace("colourpicker")} data <- teal_data() data <- within(data, { ADSL <- teal.modules.general::rADSL %>% @@ -64,7 +64,7 @@ create an app. The data will be handed over using `teal.data::teal_data()`. The itself will be constructed by multiple calls of `tm_g_scatterplot()` using different combinations of data sets. -```{r app, echo=TRUE, message=FALSE, warning=FALSE, results="hide"} +```{r app, echo=TRUE, message=FALSE, warning=FALSE, results="hide", eval = requireNamespace("ggpmics") && requireNamespace("ggExtra") && requireNamespace("colourpicker")} # configuration for the single wide datasets mod1 <- tm_g_scatterplot( label = "Single wide dataset", @@ -381,7 +381,7 @@ shinyApp(app$ui, app$server, options = list(height = 1024, width = 1024)) ## 5 - Try it out in Shinylive -```{r shinylive_url, echo = FALSE, results = 'asis'} +```{r shinylive_url, echo = FALSE, results = 'asis', eval = requireNamespace("roxy.shinylive")} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"),