How to increase stack space overflow for pandoc in R?

后端 未结 2 1140
执念已碎
执念已碎 2020-12-15 07:38

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 doc         


        
相关标签:
2条回答
  • 2020-12-15 08:06

    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"
        ]
    ---
    
    0 讨论(0)
  • 2020-12-15 08:18

    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.

    0 讨论(0)
提交回复
热议问题