knit_child in a Rmd file is printing unwanted output

后端 未结 1 1925
日久生厌
日久生厌 2021-02-14 18:07

I had succesfully used knit_child for generating pdf files, following the code of http://yihui.name/knitr/demo/child/, but when I try to use that example in a

相关标签:
1条回答
  • 2021-02-14 18:31

    You can collect the results in out, and write it to the output later in an inline R expression, e.g.

    ```{r include=FALSE}
    out = NULL
    for (p in c("p1","p2","p3","p4","p5","p6","p7","p8","p9","p10")) {
      out = c(out, knit_child('quick_variable.Rmd'))
    }
    ```
    `r paste(out, collapse='\n')`
    
    0 讨论(0)
提交回复
热议问题