Skip to content
Discussion options

You must be logged in to vote

(I did not read all)

You need to use knitr::knit_child (and eventually knitr::knit_expand), see https://bookdown.org/yihui/rmarkdown-cookbook/child-document.html.
That's how knitr works.

Related discussions: https://github.com/quarto-dev/quarto-cli/discussions?discussions_q=knit_child

On a side note:
Don't mix code cell options syntaxes, inline R syntax and YAML syntax:

```{r, results='asis'}
#| warning: false
for (i in seq_along(summary_list)) {
  cat("# ",headings[i],"\n")
  cat("```\n")
  print(summary(summary_list[[i]]))
  cat("\n```\n")
  cat("\n\n")
}
```

Use

```{r}
#| warning: false
#| output: asis
for (i in seq_along(summary_list)) {
  cat("# ",headings[i],"\n")
  cat("```\n")
  p…

Replies: 2 comments 2 replies

Comment options

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

You must be logged in to vote
2 replies
@mcanouil
Comment options

mcanouil Feb 6, 2024
Collaborator

@cderv
Comment options

cderv Feb 6, 2024
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants