2

是否有其他人有问题从 github 构建 slidify 包。我想玩,但安装返回错误。这是我使用的命令和导致的错误:

> library(devtools)
Rtools not on path and not installed in default location.
Warning message:
package ‘devtools’ was built under R version 2.14.2 
> install_github('slidify', 'ramnathv')
Installing github repo(s) slidify/master from ramnathv
Installing slidify.zip from https://github.com/ramnathv/slidify/zipball
Installing slidify
* checking for file 'C:\Users\btibert\AppData\Local\Temp\RtmpsrQIgw\ramnathv-slidify-954647c/DESCRIPTION' ... OK
* preparing 'slidify':
* checking DESCRIPTION meta-information ... OK
Warning in .write_description(db, ldpath) :
  Unknown encoding with non-ASCII data: converting to ASCII
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building 'slidify_0.1.tar.gz'
 ERROR
packaging into .tar.gz failed
Error: Command failed (1)
In addition: Warning message:
running command '"C:/PROGRA~1/R/R-214~1.1/bin/i386/R" CMD build "C:\Users\btibert\AppData\Local\Temp\RtmpsrQIgw\ramnathv-slidify-954647c" --no-manual --no-vignettes' had status 1 

我在 Windows 7 上,但这是我的会话信息以防万一:

> sessionInfo()
R version 2.14.1 (2011-12-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] devtools_0.6 plyr_1.7.1   RODBC_1.3-4 

loaded via a namespace (and not attached):
[1] RCurl_1.9-5.1 tools_2.14.1 

更新:更新到 R 2.15.0 后,我收到以下错误(即使在安装 Rtools 之后):

Warning: invalid package 'Files/R/R-2.15.0/library'
Error: ERROR: cannot cd to directory 'C:/Program'
Error: Command failed (1)
In addition: Warning message:
running command '"C:/PROGRA~1/R/R-215~1.0/bin/i386/R" CMD INSTALL C:\Users\btibert\AppData\Local\Temp\Rtmp8oMxGU/slidify_0.1.tar.gz --library=C:/Program Files/R/R-2.15.0/library' had status 1
4

1 回答 1

2

您正在运行 R 2.14.1(根据您的 SessionInfo)。slidify 将 R (>= 2.15.0) 作为依赖项,因此您将无法按原样安装它。如果可能,我建议升级到 2.15。

我试图让它与 2.14.1 一起工作,但它没有发生。不过,它在 2.15 上运行得非常好。

我不知道究竟是什么依赖于 R 2.15,但为了安全起见,ramnathv 可能会将其作为依赖项。我将它分叉并将依赖关系减少到 2.14 ( install_github('slidify', 'Dasonk')),它可以在我的 R2.14.1 副本上正常安装,但我实际上没有测试任何功能。

因此,如果您无法更新 R,您可以尝试从我的 fork 中获取它,或者如果您有 github 帐户,您可以自己 fork,然后更改依赖项。如果确实有需要 2.15 的功能,您可以尝试找出解决方法,然后向 ramnathv 发送拉取请求。

于 2012-06-08T06:26:53.820 回答