rstudio/rmarkdown-cookbook

Update recipe to include file content in a chunk

cderv opened this issue · 2 comments

cderv commented

The recipe is this one https://bookdown.org/yihui/rmarkdown-cookbook/option-code.html

When available in next version of knitr following yihui/knitr@545aed3

```{r, code=xfun::read_utf8('your-script.R')}
```

could be written

```{r, file='your-script.R'}
```

This also relates to #360 as it will impact the syntax

yihui commented

I just updated this section. But the cairoDevice package has been archived on CRAN, so GHA failed: https://github.com/yihui/rmarkdown-cookbook/runs/4723294557?check_suite_focus=true (Update: I just removed the soft dependency on cairoDevice).

cderv commented

Thank you !