R报错:WARNING: Rtools is required to build R packages, but is not currently installed.

安装R包“LDheatmap”:

install.packages("LDheatmap")

出现报错:

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/Rtools/
将程序包安装入‘C:/Users/86150/AppData/Local/R/win-library/4.2’
(因为‘lib’没有被指定)
Warning in install.packages :
  package ‘LDheatmap’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

这是因为没有安装rtool所以才会报错。

解决方法:下载安装对应版本的Rtools

1. 下载对应版本的Rtools

下载地址:添加链接描述

 2. 点击安装Rtools,默认安装即可

最后,利用命令

installed.packages()##查看包是否安装成功

你可能感兴趣的:(报错,r语言,开发语言)