> install.packages(c("maps", "ggplot2", "mapdata")) also installing the dependencies ‘cli’, ‘farver’, ‘gtable’, ‘isoband’, ‘lifecycle’, ‘rlang’, ‘scales’, ‘vctrs’ Warning in install.packages : unable to access index for repository https://cran.r-project.org/bin/windows/contrib/3.5: cannot open URL 'https://cran.r-project.org/bin/windows/contrib/3.5/PACKAGES' Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘cli’ ‘farver’ ‘isoband’ ‘rlang’ ‘vctrs’ ‘maps’ ‘mapdata’
时间: 2024-04-07 17:31:54 浏览: 99
22. R语言—ggplot2_线形参数geom_line大全.pdf
5星 · 资源好评率100%
这个警告提示是因为无法访问指定的CRAN镜像源,导致无法下载并安装指定的R包,包括`maps`、`ggplot2`和`mapdata`。请尝试更换镜像源,可以执行以下命令:
```R
options(repos = "https://cloud.r-project.org/")
```
该命令将镜像源更改为R官方源,然后再执行`install.packages(c("maps", "ggplot2", "mapdata"))`试试看。如果还是无法安装,那可能是由于这些包需要进行编译,你可以安装Rtools软件并确保Rtools的路径已经添加到环境变量中,然后再安装这些包。
阅读全文