我正在尝试在 R 中构建一个包.我制作了骨架,然后运行命令R CMD check package1.我在此处.我按照解决步骤操作,结果是:
包 devtools 不适用于 R 2.15.1
在R CMD Rd2pdf package1中打孔.
我在这里遗漏了什么,或者有什么解决方法?或者,有没有办法在包创建过程中抑制 pdf 生成?
更新:当我在 LINUX (CentOS) 中尝试时没有抛出这个错误.
解决方案虽然您已经在 Windows 下安装了 MikTeX,但这并不能使其对 R 可用.您需要将 latex 可执行文件的位置添加到您的 PATH 环境变量中.如何做到这一点完全取决于您的 Windows 版本.例如,此链接 描述了如何为 Windows 7 执行此操作.谷歌搜索更改环境variables (windows 7|windows xp|windows 95) 会告诉你如何改变你的环境变量.
I am trying to build a package in R. I made the skeleton, and ran the command R CMD check package1. I got an an error described here. I followed the solution steps, and the results are:
package devtools not available for R 2.15.1
punched in R CMD Rd2pdf package1.
Hmm.. Looks like a package Converting Rd files to LaTeX Creating pdf output from LaTeX Error in texi2dvi(file=file, pdf=true, clean=clean, quiet=quiet, : pdflatex not available Error in running tools::texi2pdf
Is there something I'm missing here, or is there a workaround? Or maybe, Is there a way to suppress pdf generation during package creation?
UPDATE: This error was not thrown when I tried it in LINUX (CentOS).
解决方案Although you have installed MikTeX under Windows, this does not make it available to R. You need to add the location of the latex executables to your PATH environment variable. How to do this exactly depends on your Windows version. For example, this link describes how to do this for Windows 7. Googling for change environment variables (windows 7|windows xp|windows 95) will tell you how to change your environment variables.
更多推荐
诊断 R 包构建错误:pdfLatex 不可用
发布评论