从Github安装R-Package IKTrading - 错误消息

时间:2015-08-11 12:42:48

标签: r windows git

我允许自己发布此帮助请求,因为我尝试从Github下载R包“IKTrading”时失败了。我同时使用了R V. 3.1.3。和R V.3.2.1。结果相同。

我的电脑在Windows 7,64位版本上运行R.这是会话状态:

R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk" Copyright (C) 2015
The R Foundation for Statistical Computing Platform:
x86_64-w64-mingw32/x64 (64-bit)

我在互联网上找到的标准推荐解决方案在我的情况下不起作用,例如: - 以管理员身份运行R(完成) - 确保已经安装了Rtools(已完成) - 严格遵守不同R包的执行顺序, 包括更具体的devtools和quantstrat(完成所有这些)。

以下是进一步调查的错误消息输出:

> install_github(repo="IKTrading", username="IlyaKipnis")
Downloading github repo IlyaKipnis/IKTrading@master
Installing IKTrading
Skipping 1 packages ahead of CRAN: PerformanceAnalytics
"C:/PROGRA~1/R/R-31~1.3/bin/x64/R" --no-site-file --no-environ --no-save  \
  --no-restore CMD INSTALL "C:/Users/Cédric  \
  Spahr/AppData/Local/Temp/RtmpkP2GeU/devtools15d04c2a1d0a/IlyaKipnis-IKTrading-0b4e0e5"  \
  --library="C:/Users/Cédric Spahr/Documents/R/win-library/3.1"  \
  --install-tests 

* installing *source* package 'IKTrading' ...
Warning in file(file, ifelse(append, "a", "w")) :
  cannot open file 'C:/Users/Cidric Spahr/Documents/R/win-library/3.1/IKTrading/DESCRIPTION': No such file or directory
Error in file(file, ifelse(append, "a", "w")) : 
  cannot open the connection
ERROR: installing package DESCRIPTION failed for package 'IKTrading'
* removing 'C:/Users/Cédric Spahr/Documents/R/win-library/3.1/IKTrading'
Error: Command failed (1)
In addition: Warning message:
Username parameter is deprecated. Please use IlyaKipnis/IKTrading 

1 个答案:

答案 0 :(得分:0)

这对我有用:

安装包quantstrat,因为IKTrading包依赖于它。

require(devtools)
install.packages("quantstrat", repos = "http://R-Forge.R-project.org")
library(quantstrat) #Load package
install_github("IlyaKipnis/IKTrading")

如果这不起作用,请尝试以管理员身份运行RStudio并再次运行这些命令。让我知道它是否有效!