I am attempting to use rmarkdown::render()
to on two nearly identical .Rmd
files and output them as a .pdf
. The example can be seen below.
rmarkdown::render("/path/to/project/Project_Name/rmarkdown_1.Rmd",
output_file = paste0("/path/to/project/Project_Name/Output/",
Sys.Date(),
"_rmarkdown_1.pdf"),
intermediates_dir = "/home/service_account/")
rmarkdown::render("/path/to/project/Project_Name/rmarkdown_2.Rmd",
output_file = paste0("/path/to/project/Project_Name/Output/",
Sys.Date(),
"_rmarkdown_2.pdf"),
intermediates_dir = "/home/service_account/")
The first .Rmd
file renders with no issue. When rendering the second, the console hangs for a few seconds, then the error is presented.
# Here is the successful message for `rmarkdown_1`
Output created: /path/to/project/Project_Name/Output/rmarkdown_1.pdf
# Here is the output for `rmarkdown_2`
|.................................................................| 100%
label: unnamed-chunk-N (with options)
List of 1
$ echo: logi FALSE
output file: /path/to/project/Project_Name/Output/rmarkdown_2.knit.md
/usr/lib/rstudio-server/bin/pandoc/pandoc +RTS -K512m -RTS /home/z02dpj/rmarkdown_2.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output pandoc708e59414368.tex --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --lua-filter /opt/R/3.6.3/lib/R/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /opt/R/3.6.3/lib/R/library/rmarkdown/rmd/lua/latex-div.lua
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
I was unable to find any missing LaTeX packages from the error log 2020-12-09_rmarkdown_2.log.
! LaTeX Error: Unknown float option `'H'.
Error: LaTeX failed to compile /path/to/project/Project_Name/2020-12-09_rmarkdown_2.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See 2020-12-09_rmarkdown_2.log for more info.
Is there any documentation or solutions for this issue?
I can adjust the control flow to execute each process in two separate sessions, but wanted to raise this issue to see if there is a solution for it.