RStudio中install.package()失败,package ‘xxx’ is not available (for R version x.y.z)

1.首先检查自己下载包的拼写是否正确,R对包名很敏感

2.看看自己的RTools在不在,不在的话请下载。。找自己对应的版本即可,安装解压到R所在文件夹并添加路径到环境变量,具体RTools安装步骤参照https://blog.csdn.net/giserLiuwei/article/details/90474900

3.In the latest R (3.2.3) there is a bug,命令行中输入install.packages("包名", dependencies=TRUE, repos='http://cran.rstudio.com/'),可以解决,大家伙的评论说同样可以解决适用于R 3.2.2 ,R3.4.0 ,R3.5.0和R 3.5.1

4.如果不行,试一试Tools–Global Options – Packages-- uncheck “Use Internet Explorer library for HTTP”.大佬提供的方法,我尝试了似乎解决不了

其他情况详细步骤参照https://stackoverflow.com/questions/25721884/how-should-i-deal-with-package-xxx-is-not-available-for-r-version-x-y-z-wa

你可能感兴趣的:(RStudio中install.package()失败,package ‘xxx’ is not available (for R version x.y.z))