Post #3481897
2026-06-30 01:32 UTC
I would have thought a perfect use case for #QuartoPub "includes" would be something like:
```{r}
#| label: conditional-include
if ( condition1) {
{{}}
} else {
{{}}
}
```
But {quarto} complains about incomplete input if I actually do that. But both docs look fine.
Guess it's figuring out the whole document pieces to include *outside* first, `cat` together, and then `render`.
#RStats
Replies (1)
-
@nxskok@cupoftea.social 2026-06-30 02:33
@rmflight@mastodon.social something like this is what I do (probably learned from @nrennie@fosstodon.org ) for assignment solutions: `r if (params$hide_answers) "::: {.content-hidden}"` (solution text goes here) `r if (params$hide_answers) ":::"` where if the hide_answers parameter is true, the solutions are hidden, and if it is false, they are displayed. (This seems like your approach but kind of backwards somehow.)