用RStudio写程序的时候突然出现无法从网络直接安装r包的问题,显示:
> install.packages('REmap')
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/src/contrib:
cannot open URL 'https://cran.rstudio.com/src/contrib/PACKAGES'
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/src/contrib:
cannot open URL 'http://www.stats.ox.ac.uk/pub/RWin/src/contrib/PACKAGES'
尝试网络上主流的解决方式是在tools-global options-packages中切换下载的镜像。尝试了切换国内镜像,例如北京、杭州的镜像。结果发现仍然不行。
之后了解到R中install.packages()是从ie浏览器中连接镜像的,所以无法连接服务器很可能是在ie这一环节出
了问题。打开电脑的ie浏览器看能不能正常上网,如果显示代理问题,在工具-internet选项-连接中将局域网
置里的代理服务器这一项去掉勾选。这样就可以正常上网了。再检查RStudio也能够正常安装r包了。
本文原始地址:https://www.ifyoung.net/rstudio.html
本站所有文章,若标明本站原创,转载请注明出处来自https://www.ifyoung.net/
暂无评论