`code_folding: show` overall but leave some chunks hidden by default

bookdown

#1

Is there any way to set code_folding: show overall but set certain chunks to hide by default? (not echo=FALSE because that would never show the code). The use case is wanting the code for most chunks to show by default (with a "hide button") but wanting some plotting code chunks to hide by default (but be available with a "show" button).


#2

I think it is still a feature request in rmarkdown :package:


#3

Added +1 to the request. Thanks for the tip.


#4

I was looking for something similar and came across this post on stackoverflow which works quite well: