title: How to increase stack space overflow for pandoc in R?
body: <p>I am getting the following error with Knit HTML:</p>
  
  <pre><code>Stack space overflow: current size 16777216 bytes.
  Use `+RTS -Ksize -RTS' to increase it.
  Error: pandoc document conversion failed with error 2
  </code></pre>
  
  <p>I am trying to solve the issue by adding the following lines on the top of markdown script:</p>
  
  <pre><code> ```r
  pandoc +RTS -K64m -RTS -f rst -
  ```
  </code></pre>
  
  <p>I was just wondering if the code is correct or where shall I place the code to make it work?</p>