0

嗨,我是 R 的相对较新的用户。在 win8 上安装了 R。现在我正在尝试安装软件包,但出现以下错误:

install.packages("C:/Users/Owner/Downloads/pROC_1.5.4.tar.gz", repos = NULL, type = "source")
Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
  unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/3.0
Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
  InternetOpenUrl failed: 'The server name or address could not be resolved'
Warning in install.packages :
  unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.0
Warning in install.packages :
  package ‘C:/Users/Owner/Downloads/pROC_1.5.4.tar.gz’ is not available (for R version 3.0.1)
Installing package into ‘C:/Users/Owner/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
ERROR: dependency 'plyr' is not available for package 'pROC'
* removing 'C:/Users/Owner/Documents/R/win-library/3.0/pROC'
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-30~1.1/bin/x64/R" CMD INSTALL -l "C:\Users\Owner\Documents\R\win-library\3.0" "C:/Users/Owner/Downloads/pROC_1.5.4.tar.gz"' had status 1
Warning in install.packages :
  installation of package ‘C:/Users/Owner/Downloads/pROC_1.5.4.tar.gz’ had non-zero exit status
4

2 回答 2

0

安装plyr包不会有很大的不同,因为您的 R 发行版不支持pROC 。此外,由于您使用 Rstudio,您可能会发现通过以下方式安装软件包更容易

Tools>Install Packages 

然后设置

Install from:  

Repository(CRAN). 

这样您就不必手动下载它们。作为 pROC 的替代方案,可以使用ROCR。如果您打算使用pROC计算曲线下的面积,也可能很有趣,无论如何我离题了。

于 2013-08-01T15:38:54.933 回答
0

看起来直接的问题是您使用正斜杠而不是反斜杠这一事实,如果您更改它看起来像这样:

install.packages("C:\\Users\\Owner\\Downloads\\pROC_1.5.4.tar.gz", repos = NULL, type = "source")

祝你好运!

于 2013-08-01T15:40:56.597 回答