As I am preparing tutorials for students, I need a way to hide content in collapsible panels which can be revealed by clicking on a button. I have got this to work using the cod
Another simple solution that would work (but without buttons and styling).
```{r, eval=FALSE} hist(1:10) ``` Click for Answer ```{r, echo=FALSE, eval=TRUE} hist(1:10) ```
And here are the two states:
Collapsed
Expanded