How to increase the memory for pandoc via an RMD file?

I'm having a problem with memory allocation when using pandoc ! here's the error I get

 output file:

/usr/bin/pandoc +RTS -K512m -RTS --to docx --from markdown+autolink_bare_uris+tex_math_single_backslash --output /app/rapport_.docx --lua-filter /usr/local/lib/R/site-library/rmarkdown/rmarkdown/lua/pagebreak.lua --table-of-contents --toc-depth 3 --highlight-style tango --reference-doc tmplt.docx
<simpleError: pandoc document conversion failed with error 137>

after researching, I found a few posts where the solution proposed was using pandoc_args like here Any Idea How to Fix This in the pandoc_args, Can't Seem to Get It Fixed · Issue #315 · rstudio/rmarkdown · GitHub and here [R] Problem R markdown document

so I did :

date: "`r format(Sys.Date(), 'Version du %d %B %Y', locale = 'fr_FR')`"
title: "Rapport"
    toc: TRUE
    pandoc_args: [
      "+RTS", "-K64m",


when calling my Rmd file using rmarkdwon::render


nothing actually changes, i still get +RTS -K512m -RTS although it's supposed to be "-K64m" now!

any idea how to do that?

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.