From 3ae2471107e7f664a48c95ad2d49bd535fb3587c Mon Sep 17 00:00:00 2001 From: Malcolm Barrett Date: Tue, 5 Mar 2024 13:59:55 -0500 Subject: [PATCH] fix check problems with vignettes --- vignettes/bias-structures.Rmd | 7 ++++++- vignettes/intro-to-dags.Rmd | 9 +++++++-- vignettes/intro-to-ggdag.Rmd | 7 ++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/vignettes/bias-structures.Rmd b/vignettes/bias-structures.Rmd index 0bc39a43..3957ec59 100644 --- a/vignettes/bias-structures.Rmd +++ b/vignettes/bias-structures.Rmd @@ -10,13 +10,18 @@ vignette: > --- ```{r setup, include = FALSE} +if (identical(Sys.getenv("IN_PKGDOWN"), "true")) { + dpi <- 320 +} else { + dpi <- 72 +} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 7, fig.height = 5, fig.align = "center", - fig.dpi = 320, + fig.dpi = dpi, warning = FALSE, message = FALSE ) diff --git a/vignettes/intro-to-dags.Rmd b/vignettes/intro-to-dags.Rmd index 38c8d8e7..684eba33 100644 --- a/vignettes/intro-to-dags.Rmd +++ b/vignettes/intro-to-dags.Rmd @@ -4,19 +4,24 @@ author: "Malcolm Barrett" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > - %\VignetteIndexEntry{An Introduction to DAGs} + %\VignetteIndexEntry{An Introduction to Directed Acyclic Graphs} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include = FALSE} +if (identical(Sys.getenv("IN_PKGDOWN"), "true")) { + dpi <- 320 +} else { + dpi <- 72 +} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 7, fig.height = 4, fig.align = "center", - fig.dpi = 320, + fig.dpi = dpi, warning = FALSE, message = FALSE ) diff --git a/vignettes/intro-to-ggdag.Rmd b/vignettes/intro-to-ggdag.Rmd index 24a15b04..7a5a5291 100644 --- a/vignettes/intro-to-ggdag.Rmd +++ b/vignettes/intro-to-ggdag.Rmd @@ -10,9 +10,14 @@ vignette: > --- ```{r setup, include = FALSE} +if (identical(Sys.getenv("IN_PKGDOWN"), "true")) { + dpi <- 320 +} else { + dpi <- 72 +} knitr::opts_chunk$set( fig.align = "center", - fig.dpi = 320, + fig.dpi = dpi, fig.height = 5, fig.width = 5, message = FALSE,