Windows下Rtools环境安装
Posted Data+Science+Insight
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows下Rtools环境安装相关的知识,希望对你有一定的参考价值。
Windows下Rtools环境安装
你是否经常见这个提示:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
http://cran.rstudio.com/bin/windows/Rtools/
# Rtools
Putting Rtools on the PATH
After installation is complete, you need to perform one more step to be able to compile R packages: you need to put the location of the Rtools make utilities (bash
, make
, etc) on the PATH
. The easiest way to do so is create a text file .Renviron
in your Documents folder which contains the following line:
PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"
You can do this with a text editor, or from R like so (note that in R code you need to escape backslashes):
writeLines('PATH="${RTOOLS40_HOME}\\\\usr\\\\bin;${PATH}"', con = "~/.Renviron")
Now restart R, and verify that make
can be found, which should show the path to your Rtools installation.
Sys.which("make")
## "C:\\\\rtools40\\\\usr\\\\bin\\\\make.exe"
If this works, you can try to install an R package from source:
install.packages("jsonlite", type = "source")
If this succeeds, you’re good to go! See the links below to learn more about rtools40 and the Windows build infrastructure.
参考:Using Rtools40 on Windows
参考:Rtools
以上是关于Windows下Rtools环境安装的主要内容,如果未能解决你的问题,请参考以下文章
转+修正在Windows和Rstudio下本地安装SparkR