在GitHub上安装blotter和Quantstrat [英] Installing blotter and quantstrat on GitHub

查看:140
本文介绍了在GitHub上安装blotter和Quantstrat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装Github的吸墨纸和Quantstrat软件包时遇到了困难.当我将它们在线托管在sourceforge上时,我在网上可以找到的大多数帮助都已经过时了.我尝试使用install_github()函数,它在下面返回错误. (实际上,当我尝试R-Forge时也会出现类似的错误)有人可以提供有关这里发生情况的线索吗?

I am experiencing a hard time in installing the blotter and quantstrat packages from Github. Most helps I can find online are quite outdated issued back then when they are hosted on sourceforge. I try to use the install_github() function and it returns error below. (In fact there is similar error when I try R-Forge) Can anyone provide a clue on what is happening here?

install_github("braverock/blotter")
Downloading GitHub repo braverock/blotter@master
from URL https://api.github.com/repos/braverock/blotter/zipball/master
Installing blotter
"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" --no-site-file --no-environ --no-save  \
  --no-restore --quiet CMD INSTALL  \
  "C:/Users/User/AppData/Local/Temp/Rtmp8mMwyT/devtools416cfd229e7/braverock-blotter-bdefb02"  \
  --library="C:/Program Files/R/R-3.3.3/library" --install-tests 

* installing *source* package 'blotter' ...
** libs

*** arch - i386
c:/Rtools/mingw_32/bin/gcc  -I"C:/PROGRA~1/R/R-33~1.3/include" -DNDEBUG     -I"d:/Compiler/gcc-4.9.3/local330/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c calcPosAvgCost.c -o calcPosAvgCost.o
make: sh.exe: Command not found
make: *** [calcPosAvgCost.o] Error 127
Warning: running command 'make -f "C:/PROGRA~1/R/R-33~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-33~1.3/share/make/winshlib.mk" SHLIB="blotter.dll" OBJECTS="calcPosAvgCost.o"' had status 2
ERROR: compilation failed for package 'blotter'
* removing 'C:/Program Files/R/R-3.3.3/library/blotter'
Error: Command failed (1)

已安装Rtools并将其包含在PATH变量中:

Rtools installed and included in the PATH variable:

  • C:\ RBuildTools \ 3.3 \ bin
  • C:\ RBuildTools \ 3.3 \ gcc-4.6.3 \ bin

会话信息:

R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

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

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

other attached packages:
[1] devtools_1.12.0

loaded via a namespace (and not attached):
[1] httr_1.1.0    R6_2.1.2      tools_3.3.3   withr_1.0.2   curl_2.3     
[6] memoise_1.0.0 git2r_0.14.0  digest_0.6.11

推荐答案

尝试一下:

install.packages("devtools")
require(devtools)
install_github("braverock/FinancialInstrument")
install_github("joshuaulrich/xts")
install_github("braverock/blotter")
install_github("braverock/quantstrat")
install_github("braverock/PerformanceAnalytics")

这篇关于在GitHub上安装blotter和Quantstrat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆