From 00a94bc1b688b13be7822afc843cdeb3242629ec Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Sun, 9 Jun 2024 12:17:59 +0200 Subject: [PATCH] eval conditional on gt --- DESCRIPTION | 5 +---- vignettes/model_parameters_print.Rmd | 8 ++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 652565b36..fc92200a4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -213,8 +213,5 @@ RoxygenNote: 7.3.1 Roxygen: list(markdown = TRUE) Config/testthat/edition: 3 Config/testthat/parallel: true -Config/Needs/website: - rstudio/bslib, - r-lib/pkgdown, - easystats/easystatstemplate +Config/Needs/website: easystats/easystatstemplate Config/rcmdcheck/ignore-inconsequential-notes: true diff --git a/vignettes/model_parameters_print.Rmd b/vignettes/model_parameters_print.Rmd index ba23f8583..248dec305 100644 --- a/vignettes/model_parameters_print.Rmd +++ b/vignettes/model_parameters_print.Rmd @@ -15,8 +15,7 @@ editor_options: bibliography: bibliography.bib --- -```{r , include=FALSE} -library(knitr) +```{r, include=FALSE} options(knitr.kable.NA = "") options(digits = 2) @@ -25,19 +24,20 @@ knitr::opts_chunk$set( collapse = TRUE, warning = FALSE, message = FALSE, + eval = requireNamespace("gt", quietly = TRUE), comment = "#>", out.width = "100%", tidy.opts = list(width.cutoff = 100) ) -pkgs <- c("gt", "datawizard", "glmmTMB", "parameters") - +pkgs <- c("gt", "glmmTMB") successfully_loaded <- sapply(pkgs, requireNamespace, quietly = TRUE) if (all(successfully_loaded)) { library(parameters) library(datawizard) library(glmmTMB) + library(gt) } set.seed(333)