0
votes

It is possible to create a website with several rmarkdown files. For each rmarkdown file, we can specify some global options like:

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message=FALSE, warning=FALSE)
```

If I want to apply all these options to all rmd files, I can put the same code in each file.

I would like to know if it is possible to put this code somewhere so that it can be shared to every rmd files. In fact, sometimes, I want to make some change (for example set echo = TRUE), and I want to do it once for the entire website.

1

1 Answers

4
votes

You can include a child document

```{r, child="_setup.Rmd"}
```

at the beginning of each rmd file.