0

I would like to make text output foldable in my HMTL-R markdown file. So when using print(something) the printed output is hidden by default but viewable after pressing a button.

There is the option to show/hide code in the R Markdown file

output: 
 html_document:
   code_folding: hide

But this does not affect printed output.

There is already a question to make verbatim text foldable ( How to fold verbatim text (not code) in R bookdown?) But inserting inline R code like this

```{fold}
`r 2 + 2`
```

does not work out.

NashVio
  • 133
  • 1
  • 6

0 Answers0