Reuse chunks
#1161
-
As a statistical programmer, using R and R Markdown, I was used to reuse code chunks such as explained here: https://bookdown.org/yihui/rmarkdown-cookbook/reuse-chunks.html.
I have attempted to find information about this feature for quarto documents, with no success. Do you know if this is implemented somehow in quarto? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
cderv
Jun 16, 2022
Replies: 1 comment 3 replies
-
Everything that works with knitr should work with Quarto. So this works ---
title: test
format: html
---
Here is a code chunk that is not evaluated:
```{r, chunk-one, eval=FALSE}
1 + 1
2 + 2
```
Now we actually evaluate it:
```{r, chunk-one, eval=TRUE}
```
And I can evaluate it later again in the same document:
```{r, chunk-one, eval=TRUE}
``` At least on my side with latest version. Is this correctly working for you ? |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
FCACollin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Everything that works with knitr should work with Quarto.
So this works
At least on my side with latest version.
Is this correctly working for you ?