r - R Markdown - 如何导出为 PDF 文件?
问题描述
我无法将 R markdown 导出到 PDF 文件(或 Word)。
我打开了一个新的“R markdown”文件,只需使用模板并将其重命名为 test.Rmd。
但是,这对我不起作用:
render("test.Rmd", output_format = "pdf_document")
Error in abs_path(input) : The file 'test.Rmd' does not exist.
In addition: Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="test.Rmd": The system cannot find the file specified
这很奇怪,因为我在桌面上保存了 test.Rmd。
另外,我尝试单击“Knit”>“Knit to PDF”> 给我这个错误:输出文件:test.knit.md
pandoc.exe: test.utf8.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted
我尝试过但没有帮助的方法:
install.packages('tinytex')
tinytex::install_tinytex()
谁能帮我这个?顺便说一句,我使用的是企业计算机,因此我无法下载 R 之外的任何外部应用程序。
解决方案
推荐阅读
- php - Laragon : 错误消息 : (include_path='.;C:/laragon/etc/php/pear') 在第 0 行的未知
- checkbox - 如何在警报控制器中配置复选框并在 Ionic 4 中返回值?
- css - 使用“as”属性时,样式化组件不继承样式
- python - 'utf-8' 编解码器无法解码位置中的字节 0x96 ...当通过 pandas read_csv 读取文本文件时
- python - circleci:pip install dlib 失败
- c# - C#返回错误'子查询返回超过1个值'但这应该没问题
- java - Array.sort() 和 JAVA 中的对象的问题
- flutter - Flutter 状态小部件未更新
- arrays - 如何从两个双列表中删除条目,以使它们的第二列在某个错误内匹配
- android - Android Studio 终端未显示