改变了工作地点后,安装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包
网友评论