Rstudio WARNING: Rtools is required to build R packages but is not currently installed. Please do...

最近安装R包时出现“WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:”报错,需要下载rtools.

rtools安装

从r语言官网下载rtools,官网
获得安装包之后直接安装。
安装之后运行还是有warning出现,还需要配置路径,可以进入Rstudio,输入以下命令配置路径

writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")

重启Rstudio,输入

Sys.which("make")

查看是不是已经配置成功,若出现类似以下的提示,表示已经配置成功


image.png

然后就可以使用了

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容