Skip to content
Discussion options

You must be logged in to vote

This knitr recipe should work in a quarto document. Are you trying to use this in a specific context though ?
Can you share an example ?

Here is a working quarto document

---
title: "Reproducible Quarto Document"
format: html
execute: 
  echo: false
---

# Content 1

```{r}
plot(mtcars)
```

# Content 2

```{r}
head(mtcars)
```


# Appendix: All code for this report

```{r ref.label=knitr::all_labels()}
#| echo: true
#| eval: false
```

For last chunk, I am missing Yaml option and usual knitr syntax, because you need knitr::all_labels() to be evaluated
Full YAML syntax would look like

```{r}
#| echo: true
#| eval: false
#| ref-label: !expr knitr::all_labels()
```

but

  • You can get R express…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cderv
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants