-
DescriptionHi everyone, I'm working on automated reporting in RStudio using Quarto, with output to PowerPoint (pptx). Problem: What I Tried:
However, the last approach still result in empty slides when the condition is not met. Manually deleting empty slides isn’t practical, as I’m generating over 100 reports. Question: Context:
Any help or pointers would be appreciated, as this is for a client and manual cleanup would be a big pain. Thank you and wishing you the best!
(edited because of formatting). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In order to do that, you need to generate the whole slide markdown in your code. Note that you should have nothing except the language between the brackets. If you want to add a label, use ---
title: "Example Presentation"
format: pptx
---
```{r}
#| label: setup
#| output: asis
# example dataframe
df_companyX <- data.frame(
x = 1:5,
y = rnorm(5)
)
if (nrow(df_companyX) >= 5L) {
cat("## Slide that validates condtion")
}
``` Could you properly format your post using code blocks for code and terminal outputs? Thanks. |
Beta Was this translation helpful? Give feedback.
In order to do that, you need to generate the whole slide markdown in your code.
Note that you should have nothing except the language between the brackets. If you want to add a label, use
#| label: setup
.Could you properly format your post using code blocks for code and terminal outputs? Thanks.
If your code contains code blocks, you need to enclose it using more backticks, i.e., usually four
````
.See https://quarto.org/bug-reports.html#formatt…