CRAN网站缺少数据集包?

时间:2014-08-22 20:10:59

标签: r

我目前正在进行一项任务(使用Windows 7 Professional机器),因此我必须使用数据集'在knitr文件中打包。由于我正在尝试编写我的文档,因此在使用install.packages()命令时,我必须将CRAN镜像网站作为repo提供。以下是我的代码块:

list.of.packages <- c ('R.utils', 'googleVis', 'choroplethr', 'datasets', 'MASS')
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) {
    install.packages(new.packages, repos="http://cran.rstudio.com/")
    lapply (new.packages, require, character.only = TRUE)
} else {
    lapply(list.of.packages, require, character.only = TRUE)
}

但是,我收到以下错误:

Quitting from lines 13-16 (Preview-191015a600a.Rmd) 
Error in contrib.url(repos, "source") : 
  trying to use CRAN without setting a mirror
Calls: <Anonymous> ... withVisible -> eval -> eval -> install.packages -> contrib.url
Execution halted

如果我删除了数据集&#39;从包列表中,程序运行没有任何问题。所以,我试着寻找数据集&#39;在http://cran.rstudio.com/网站上打包,但未找到数据集包。我明白这就是为什么我的编织者会抛出错误的原因。

然而,我很惊讶没有看到&#39;数据集&#39;在cran网站上打包。我是R的新手,所以不确定是否一直如此。我曾尝试在整个网络上寻找数据集包镜像,但无济于事。

是否有人在CRAN上链接到数据集包repo?

感谢您的帮助!

0 个答案:

没有答案
相关问题