pheatmap包下载时rlang包版本需更新的问题解决及rlang包重新安装错误
1.Rstudio中安装pheatmap包的报错提示
我感觉如果安装完Rstudio,过段时间用某些包是可能会报版本的问题
报错示例:
Error: package or namespace load failed for ‘pheatmap’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.4.9 is already loaded, but >= 0.4.10 is required
2.问题解决
<1>删除rlang
我第一次删除是直接用remove.packages(“rlang”)。如果遇到没有指定lib时,可以利用.libPaths()函数确定library的路径,在library中手动删除rlang包
<2>安装rlang
我尝试用install.packages(“rlang”),提示错误
Warning in install.packages :
无法在貯藏處https://mirrors.nju.edu.cn/CRAN/src/contrib中读写索引:
cannot open URL 'https://mirrors.nju.edu.cn/CRAN/src/contrib/PACKAGES'
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/
猜测可能是镜像源的问题?
故用
install.packages("rlang", dependencies=TRUE, repos='http://cran.rstudio.com/')
之后用library(pheatmap),不会报错啦