title: Double space issue in R markdown text and code
body: <p>I am working on an R markdown document and would like to use double spacing. I use the code</p>
  
  <pre><code>---
  title: "smp"
  author: "XXX YYY"
  date: "October 9, 2019"
  output:
    pdf_document: default
  header-includes: \usepackage{setspace}\doublespacing
  ---
  </code></pre>
  
  <p>However, It does not only double-spaces the text but also the code and the output. I do not want double space in the output. Is there any way to solve this? I attached a screenshot of the PDF output. </p>
  
  <p><a href="https://i.stack.imgur.com/70blA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/70blA.png" alt="enter image description here"></a></p>