美文网首页
安装R包报错unable to access index for

安装R包报错unable to access index for

作者: 尹小奥 | 来源:发表于2022-01-24 16:04 被阅读0次

改变了工作地点后,安装R包时出现报错

install.packages("VennDiagram")
#Warning: unable to access index for repository https://mirrors.tongji.edu.cn/CRAN/bin/macosx/contrib/4.1:
#  cannot open URL 'https://mirrors.tongji.edu.cn/CRAN/bin/macosx/contrib/4.1/PACKAGES'

其实改变镜像就可以了,要选择离自己近的镜像

options(repos=structure(c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/")))

再进行安装就可以了

install.packages("VennDiagram")
#trying URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/macosx/contrib/4.1/VennDiagram_1.7.1.tgz'
#Content type 'application/octet-stream' length 247726 bytes (241 KB)
#==================================================
#downloaded 241 KB
#The downloaded binary packages are in  #/var/folders/1h/v10vvcv51b969_64czytxlgw0000gn/T//Rtmp8fjMB8/downloaded_packages

其他安装方法见总结一下手动安装R包

相关文章

网友评论

      本文标题:安装R包报错unable to access index for

      本文链接:https://www.haomeiwen.com/subject/rjvbhrtx.html