目录
一、报错
在安装R包“ggalt”时,ggplot2有时也会出现这样的问题。这就是出现了镜像错误。遇到 “cannot open URL”
报错如下:
> install.packages("ggalt") Warning in install.packages : 无法在貯藏處https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib中读写索引: cannot open URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/PACKAGES' Warning in install.packages : 无法在貯藏處https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib中读写索引: cannot open URL 'https://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/PACKAGES' Warning in install.packages : package ‘ggalt’ is not available for this version of R A version of this package for your version of R might be available elsewhere, see the ideas at https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages Warning in install.packages : 无法在貯藏處https://mirrors.tuna.tsinghua.edu.cn/CRAN/bin/windows/contrib/4.3中读写索

文章讲述了在安装R包ggalt时遇到的镜像错误,提示无法打开URL。解决方法是更改R的全局选项,选择国内镜像源,最终成功安装了ggalt及其依赖包。
最低0.47元/天 解锁文章
2万+





