如何在 R 中选择 CRAN 镜像 [英] How to select a CRAN mirror in R

查看:30
本文介绍了如何在 R 中选择 CRAN 镜像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过执行以下操作通过 R 提示安装软件包:

I'm trying to install a package through the R prompt by doing the following:

install.packages('RMySQL')

但输出如下:

--- Please select a CRAN mirror for use in this session ---

没有别的!我找不到这个非常基本的问题的解决方案.我应该输入什么来选择 CRAN 镜像?

And nothing else! I can't find a solution to this very basic problem. What am I supposed to type in order to select a CRAN mirror?

操作系统:Mac-OS X 10.6.8R 版本:2.15.0

OS: Mac-OS X 10.6.8 R Version: 2.15.0

推荐答案

您应该得到一个带有存储库列表的窗口或带有一些选项的文本菜单.但如果没有出现,您始终可以使用 repos 参数指定自己从何处下载包的镜像.通过这样做,R 将不再询问您有关存储库的信息.示例:

You should either get a window with a list of repositories or a text menu with some options. But if that is not appearing, you can always specify the mirror from where to download the packages yourself by using repos parameter. By doing that, R will not ask you anymore about the repository. Example:

install.packages('RMySQL', repos='http://cran.us.r-project.org')

这里有 R 的镜像列表.

这篇关于如何在 R 中选择 CRAN 镜像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆