diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index a73b25644..2aace5e2b 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -56,6 +56,19 @@ jobs: ) name: revdepcheck ↩️ uses: insightsengineering/r.pkg.template/.github/workflows/revdepcheck.yaml@main + with: + lookup-refs: | + insightsengineering/roxy.shinylive + insightsengineering/teal + insightsengineering/teal.transform + insightsengineering/teal.code + insightsengineering/teal.data + insightsengineering/teal.slice + insightsengineering/teal.logger + insightsengineering/teal.reporter + insightsengineering/teal.widgets + insightsengineering/tern + insightsengineering/rtables rhub: if: > github.event_name == 'schedule' || ( @@ -66,10 +79,12 @@ jobs: uses: insightsengineering/r.pkg.template/.github/workflows/rhub.yaml@main with: lookup-refs: | + insightsengineering/roxy.shinylive insightsengineering/teal insightsengineering/teal.transform insightsengineering/teal.code insightsengineering/teal.data + insightsengineering/teal.slice insightsengineering/teal.logger insightsengineering/teal.reporter insightsengineering/teal.widgets diff --git a/DESCRIPTION b/DESCRIPTION index a19237bbc..42b807f01 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -81,7 +81,7 @@ Suggests: VignetteBuilder: knitr Config/Needs/verdepcheck: haleyjeppson/ggmosaic, tidyverse/ggplot2, - rstudio/shiny, insightsengineering/teal, + rstudio/shiny, insightsengineering/teal, insightsengineering/teal.transform, mllg/checkmate, tidyverse/dplyr, rstudio/DT, tidyverse/forcats, r-lib/scales, daattali/shinyjs, shinyTree/shinyTree, rstudio/shinyvalidate, dreamRs/shinyWidgets, diff --git a/vignettes/teal-modules-general.Rmd b/vignettes/teal-modules-general.Rmd index 6969a0695..0980da151 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", quietly = TRUE)} # 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("app"), knitr::knit_code$get("shinyapp") @@ -88,7 +88,7 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` @@ -146,7 +146,7 @@ In a `teal` app, data and modules are decoupled. In the app above: - The app developer specified the module and assigned it to the `modules` argument. - The `init` function took these arguments and returned a list containing `ui` and `server` object, which can be demonstrated by running: -```{r, indent = " "} +```{r, indent = " ", eval = requireNamespace("sparkline", quietly = TRUE)} class(app) names(app) ``` diff --git a/vignettes/using-association-plot.Rmd b/vignettes/using-association-plot.Rmd index b303ff9b7..b7f8aff42 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -316,6 +316,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-bivariate-plot.Rmd b/vignettes/using-bivariate-plot.Rmd index a13de8866..431c87929 100644 --- a/vignettes/using-bivariate-plot.Rmd +++ b/vignettes/using-bivariate-plot.Rmd @@ -630,7 +630,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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -642,6 +642,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-cross-table.Rmd b/vignettes/using-cross-table.Rmd index 73c823003..0a9ad3011 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -159,6 +159,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-data-table.Rmd b/vignettes/using-data-table.Rmd index 686f61b14..27fd1ea3c 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -129,6 +129,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-outliers-module.Rmd b/vignettes/using-outliers-module.Rmd index 1d6ca8536..507cf4716 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -210,6 +210,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-regression-plots.Rmd b/vignettes/using-regression-plots.Rmd index 94c8aac14..fe10bce4f 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -289,6 +289,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-response-plot.Rmd b/vignettes/using-response-plot.Rmd index f8054e4c8..59dae80f3 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -398,6 +398,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-scatterplot-matrix.Rmd b/vignettes/using-scatterplot-matrix.Rmd index c89490ad4..28d09f70e 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -177,6 +177,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ``` diff --git a/vignettes/using-scatterplot.Rmd b/vignettes/using-scatterplot.Rmd index bd28df325..ec40e2e8d 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", quietly = TRUE)} code <- paste0(c( knitr::knit_code$get("library"), knitr::knit_code$get("data"), @@ -393,6 +393,6 @@ url <- roxy.shinylive::create_shinylive_url(code) cat(sprintf("[Open in Shinylive](%s)\n\n", url)) ``` -```{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")} +```{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")} knitr::include_url(url, height = "800px") ```