我在 Windows 10 机器上安装了 R 3.5.0 和 Rtools 3.5。运行devtools::find_rtools()
产量TRUE
但是当我尝试检查并构建我正在处理的包时,我收到错误:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/
基于此链接,我运行了以下命令,但得到了相同的错误:
Sys.setenv(PATH = paste("C:/Rtools/bin", Sys.getenv("PATH"), sep=";"))
Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")
如何让 Rtools 被识别以构建包?