【发布时间】:2021-01-03 03:17:01
【问题描述】:
我在使用 rmarkdown 将 .rmd 文件编织成 .html(和 pdf )文件时遇到问题。我在以下示例中尝试编写的报告只是您在启动新的 rmakrdown 文档时获得的示例报告。
这是我收到的错误消息:
==> rmarkdown::render('C:/Users/***/Documents/test/test.Rmd', encoding = 'UTF-8');
processing file: test.Rmd
|.......... | 14%
ordinary text without R code
|.................... | 29%
label: setup (with options)
List of 1
$ include: logi FALSE
|.............................. | 43%
ordinary text without R code
|........................................ | 57%
label: cars
|.................................................. | 71%
ordinary text without R code
|............................................................ | 86%
label: pressure (with options)
List of 1
$ echo: logi FALSE
|......................................................................| 100%
ordinary text without R code
output file: test.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output test.html --email-obfuscation none --self-contained --standalone --section-divs --template "\\storage-***.se\home$\****\My Documents\R\win-library\4.0\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --variable "theme:bootstrap" --include-in-header "C:\Users\*****\AppData\Local\Temp\Rtmpc1mrLs\rmarkdown-str511010115ff7.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --lua-filter "\\storage-****.se/home$/****/My Documents/R/win-library/4.0/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "\\storage-***-se/home$/*****/My Documents/R/win-library/4.0/rmarkdown/rmd/lua/latex-div.lua"
pandoc.exe: \\: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted
Pandoc 尝试访问保存在我计算机上的文件,但由于某种原因找不到它。这是我的工作计算机,所有内容都保存在本地,然后上传到服务器。我已经在我的办公室与 IT 进行过交谈,他们不知道为什么它不起作用。 在将所有内容(r 项目、包和我进行分析的文件)移动到未上传到备份服务器的地图之前,我已经设法获得了 rmarkdown 报告。 然而,这不是一种安全的方式,因为显然没有备份。我试图只在本地使用 r-project 进行针织,但它也不起作用。 为什么 pandoc 找不到这个二进制文件,有没有办法让它工作而不必冒着工作安全的风险?如果没有,是否有另一种方法可以在没有 pandoc 的情况下创建类似文件?
我看到了类似的问题,但没有什么可以给我任何答案。或者给 IT 部门的人一些线索。
谢谢! 约翰娜
这是会话信息:
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=Swedish_Sweden.1252 LC_CTYPE=Swedish_Sweden.1252
[3] LC_MONETARY=Swedish_Sweden.1252 LC_NUMERIC=C
[5] LC_TIME=Swedish_Sweden.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.2 htmltools_0.5.0 tools_4.0.2 yaml_2.2.1 rmarkdown_2.3
[6] knitr_1.29 xfun_0.16 digest_0.6.25 rlang_0.4.7 evaluate_0.14
版本:
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 4
minor 0.2
year 2020
month 06
day 22
svn rev 78730
language R
version.string R version 4.0.2 (2020-06-22)
nickname Taking Off Again
> pandoc_version()
[1] ‘2.7.2’
> pandoc_available()
[1] TRUE
【问题讨论】:
标签: r r-markdown pandoc