Skip to content

Commit

Permalink
[vignette] add purl = FALSE to chunks that use ggplot2. fixes #1073 (
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Sep 7, 2024
1 parent 1c709b8 commit 5d432e9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vignettes/openxlsx2_charts_manual.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -164,4 +164,3 @@ wb <- wb %>%
}
```

0 comments on commit 5d432e9

Please sign in to comment.