如何增加R中的Pandoc的堆栈空间溢出? [英] How to increase stack space overflow for pandoc in R?

查看:115
本文介绍了如何增加R中的Pandoc的堆栈空间溢出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Knit HTML出现以下错误:

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

我正在尝试通过在markdown脚本顶部添加以下几行来解决此问题:

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?

推荐答案

解决方案:在Rmd文件的开头添加以下代码段以增加堆栈大小:

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"
    ]
---

这篇关于如何增加R中的Pandoc的堆栈空间溢出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆