When writting rmarkdown html_document
I often have successive code chunks that are displayed but have no outputs.
When this happen, like when
- eval = FALSE
- results = "hidden"
I would like the code chunks to be "merged".
I know about ref.label = ""
and it could be done with it but it would makes chunk label to be extremely complex/heavy.
Is there some javascript, css, option magic to help me achieving what I'd like ?
example:
---
title: "Test"
date: '`r Sys.Date()`'
output: html_document
---
# Title 1
Some text
```{r, echo = TRUE, eval = FALSE}
1 + 1 # eval = FALSE so no output
```
```{r, echo = TRUE, results = "hide"}
1 + 2 # results hidden so no output
```
```{r, echo = TRUE}
1 + 3
```
Some other text
```{r, echo = TRUE, eval = FALSE}
1 + 4 # eval = FALSE so no output but text follows
```
Some other text
```{r, echo = TRUE}
1 + 4
```
output