Is there any way to use global chunk parameters in html_notebooks ?
This html_document shows only the header (as required in this MWE):
---
title: "Test"
output:
html_document
---
```{r setup, echo=FALSE}
library(knitr)
opts_chunk$set(echo=FALSE, results='hide', fig.keep='none')
```
```{r}
1+1
plot(1:5, 1:5)
```
However, in the same document as in html_notebook, all code fragments and output are displayed (global block parameters are ignored):
---
title: "Test"
output:
html_notebook
---
```{r setup, echo=FALSE}
library(knitr)
opts_chunk$set(echo=FALSE, results='hide', fig.keep='none')
```
```{r}
1+1
plot(1:5, 1:5)
```
I do not think this is intended, since I can directly provide the parameters of the piece in the piece and get the desired result (only the name):
---
title: "Test"
output:
html_notebook
---
```{r setup, echo=FALSE}
library(knitr)
```
```{r echo=FALSE, results='hide', fig.keep='none'}
1+1
plot(1:5, 1:5)
```
source
share