当前位置:   article > 正文

关于RStudio3.2.2 安装包失败_r 3.2.2 镜像

r 3.2.2 镜像
Warning in install.packages :
  InternetOpenUrl failed: '无法与服务器建立连接'
Warning in install.packages :
  InternetOpenUrl failed: '无法与服务器建立连接'
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/3.2
Packages which are only available in source form, and may
  need compilation of C/C++/Fortran: ‘reshape2’ ‘NMF’
  ‘igraph’
  These will not be installed
installing the source packages ‘ggplot2’, ‘magrittr’, ‘irlba’

trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_1.0.1.tar.gz'
Warning in install.packages :
  InternetOpenUrl failed: '无法与服务器建立连接'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cran.rstudio.com/src/contrib/ggplot2_1.0.1.tar.gz'
Warning in install.packages :
  download of package ‘ggplot2’ failed
trying URL 'https://cran.rstudio.com/src/contrib/magrittr_1.5.tar.gz'


其实换个CRAN即可。


步骤:

1.首先,你可以打开 http://mirror.bjtu.edu.cn/cran/这个网站,选择一个合适的镜像地址

2.到你的R软件目录下,找到Rprofile.site这个文件,(E:\R-3.2.21\etc\Rprofile.site 这是我的目录)

3.打开,添加以下设置

 # set a CRAN mirror  
     local({r <- getOption("repos")  
           r["CRAN"] <- "http://mirrors.xmu.edu.cn/CRAN/"  
           options(repos=r)})
其中r["CRAN"] <- "http://mirrors.xmu.edu.cn/CRAN/"  中的右方为你所选择的镜像地址

4.在R的CONSOLE中安装包即可。


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/333502
推荐阅读
相关标签
  

闽ICP备14008679号