title: How to add code folding to output chunks in rmarkdown html documents
body: <p>I really appreciate the "code_folding" feature in RMarkdown. However, what I really need is to have the code show all the time and toggle the display on the output.</p>
  
  <pre><code>---
  title: "test file"
  author: "dayne"
  date: "June 10, 2016"
  output: 
    html_document:
      code_folding: hide
  ---
  
  ```{r setup, include=FALSE}
  knitr::opts_chunk$set(echo = TRUE)
  ```
  
  Here is a basic example.
  
  ```{r}
  3 + 4
  ```
  </code></pre>
  
  <p>Is there a way to toggle the output rather than the code? The best (but not ideal) solution I have thought of is to add <code>collapse=TRUE</code> to the chunks, but then the code and the output still display at the same time. </p>
  
  <p>Link to the compiled document: <a href="http://rpubs.com/daynefiler/188408" rel="noreferrer">http://rpubs.com/daynefiler/188408</a> </p>