R安装Rtools40正确配置路径

参考资料

https://cran.r-project.org/bin/windows/Rtools/

背景

建造由C/C++/Fortran构成的R包。其他不需要用到Rtools40.

步骤

  1. 从CRAN下载并安装
  2. 配置路径:在R中运行writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")
  3. 重启R
  4. 检测路径Sys.which("make")得到的应该类似"C:\rtools40\usr\bin\make.exe"
  5. 安装一个包进行测试install.packages("jsonlite", type = "source")

猜你喜欢

转载自blog.csdn.net/qq_40136685/article/details/107195249
今日推荐