【发布时间】:2015-12-27 18:54:42
【问题描述】:
我正在尝试在我的 Windows vista 机器上安装 dplyr 包(通过 R Studio)。我安装了最新版本的 R (3.22) 和 R Studio 的预览版。我过去安装软件包时没有遇到任何问题,但是当我尝试安装这个时,我得到了错误:
> install.packages("dplyr")
Installing package into ‘C:/Users/user/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependency ‘BH’
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/BH_1.58.0-1.zip'
Content type 'application/zip' length 13846694 bytes (13.2 MB)
downloaded 13.2 MB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/dplyr_0.4.3.zip'
Content type 'application/zip' length 2552598 bytes (2.4 MB)
downloaded 2.4 MB
我还尝试安装 devtools 包,以便我可以直接从 github 安装 dplyr 包。但是,devtools 包也给我安装带来了麻烦:
> install.packages("devtools")
Installing package into ‘C:/Users/user/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
also installing the dependencies ‘BH’, ‘brew’, ‘xml2’, ‘httr’, ‘curl’, ‘memoise’, ‘whisker’, ‘jsonlite’, ‘roxygen2’, ‘rversions’, ‘git2r’
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/BH_1.58.0-1.zip'
Content type 'application/zip' length 13846694 bytes (13.2 MB)
downloaded 13.2 MB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/brew_1.0-6.zip'
Content type 'application/zip' length 104730 bytes (102 KB)
downloaded 102 KB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/xml2_0.1.2.zip'
Content type 'application/zip' length 3174710 bytes (3.0 MB)
downloaded 3.0 MB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/httr_1.0.0.zip'
Content type 'application/zip' length 382429 bytes (373 KB)
downloaded 373 KB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/curl_0.9.3.zip'
Content type 'application/zip' length 4384906 bytes (4.2 MB)
downloaded 4.2 MB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/memoise_0.2.1.zip'
Content type 'application/zip' length 16878 bytes (16 KB)
downloaded 16 KB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/whisker_0.3-2.zip'
Content type 'application/zip' length 64756 bytes (63 KB)
downloaded 63 KB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/jsonlite_0.9.17.zip'
Content type 'application/zip' length 1009755 bytes (986 KB)
downloaded 986 KB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/roxygen2_4.1.1.zip'
Content type 'application/zip' length 594453 bytes (580 KB)
downloaded 580 KB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/rversions_1.0.2.zip'
Content type 'application/zip' length 16455 bytes (16 KB)
downloaded 16 KB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/git2r_0.11.0.zip'
Content type 'application/zip' length 2690457 bytes (2.6 MB)
downloaded 2.6 MB
trying URL 'http://cran.stat.sfu.ca/bin/windows/contrib/3.2/devtools_1.9.1.zip'
Content type 'application/zip' length 357684 bytes (349 KB)
downloaded 349 KB
这些文件都没有被写入“C:/Users/user/Documents/R/win-library/3.2”。
其他的尝试:
- 确保我安装了最新版本的 R
- 以管理员模式打开 R Studio 并安装软件包,然后
- 改为安装在 R 指挥官中
- 尝试不同的 CRAN 镜像
这些都没有帮助。
任何想法如何安装 dplyr?
【问题讨论】:
-
它会给你任何错误信息吗?
-
不,只是打印出我发布的内容。
-
你能检查一下
packageVersion("dplyr")看看它返回了什么 -
它打印“packageVersion("dplyr") 中的错误:找不到包 'dplyr'。”
-
您可以尝试将 tar/zip 文件下载到本地计算机,然后在本地安装,可能使用类似 utils::install.packages("c:/R/dplyrversion.zip", repos =NULL) 来自 Rstudio