I am getting the following error with Knit HTML:
Stack space overflow: current size 16777216 bytes.
Use `+RTS -Ksize -RTS' to increase it.
Error: pandoc document conversion failed with error 2
I am trying to solve the issue by adding the following lines on the top of markdown script:
```r
pandoc +RTS -K64m -RTS -f rst -
```
I was just wondering if the code is correct or where shall I place the code to make it work?
Solution: Add the following code snippet at the beginning of your Rmd file to increase the stack size:
---
title: "Habits"
output:
html_document:
pandoc_args: [
"+RTS", "-K64m",
"-RTS"
]
---
Here is a possible workaround. After failing to resolve the error using the RStudio GUI button to 'Knit HTML', the following generated the expected HTML file.
library(knitr)
knit2html('./myNotes.Rmd')
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With