From d8440292343bbeae33fc0645e205f6888b560661 Mon Sep 17 00:00:00 2001 From: Jan Marvin Garbuszus Date: Sat, 7 Sep 2024 10:41:54 +0200 Subject: [PATCH] [vignette] add `purl = FALSE` to chunks that use ggplot2. fixes #1073 --- vignettes/openxlsx2_charts_manual.Rmd | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vignettes/openxlsx2_charts_manual.Rmd b/vignettes/openxlsx2_charts_manual.Rmd index 2dfd38611..4c04f46e2 100644 --- a/vignettes/openxlsx2_charts_manual.Rmd +++ b/vignettes/openxlsx2_charts_manual.Rmd @@ -46,7 +46,7 @@ wb$add_worksheet("add_image")$add_image(file = myplot) You can include `{ggplot2}` plots similar to how you would include them with `openxlsx`. Call the plot first and afterwards use `wb_add_plot()`. -```{r ggplot} +```{r ggplot, purl = FALSE} if (requireNamespace("ggplot2")) { library(ggplot2) @@ -67,7 +67,7 @@ wb$add_worksheet("add_plot")$ If you want vector graphics that can be modified in spreadsheet software the `dml_xlsx()` device comes in handy. You can pass the output via `wb_add_drawing()`. -```{r rvg} +```{r rvg, purl = FALSE} if (requireNamespace("ggplot2") && requireNamespace("rvg")) { library(rvg) @@ -164,4 +164,3 @@ wb <- wb %>% } ``` -