I'm creating a blog with blogdown in which I compare code from R and code from Stata. I would like:
- the R code chunks to be visible by default in the article
- the Stata code chunks to be invisible by default but visible if the user clicks on a button
This person and this person succeeded in folding their code chunks in blogdown but apparently that hides or shows every chunks by default. How can I hide only some chunks by default? Is there an option that hides or shows code chunk in blogdown (like the options eval
, echo
...)?