首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装3.4.2版quantstrat的问题

安装3.4.2版quantstrat的问题
EN

Stack Overflow用户
提问于 2017-11-19 17:41:39
回答 1查看 743关注 0票数 0

我试图在R中安装quantstrat软件包,我已经安装了quantstrat所需的其他软件包,下面是我的会话信息。

代码语言:javascript
复制
sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Portuguese_Brazil.1252  LC_CTYPE=Portuguese_Brazil.1252    LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C                      
[5] LC_TIME=Portuguese_Brazil.1252    

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

other attached packages:
 [1] blotter_0.12.4             PerformanceAnalytics_1.5.1 FinancialInstrument_1.2.0  foreach_1.4.3              quantmod_0.4-11           
 [6] TTR_0.23-2                 devtools_1.13.4            xts_0.10-0                 zoo_1.8-0                  lubridate_1.7.1           

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.13     rstudioapi_0.7   knitr_1.17       magrittr_1.5     lattice_0.20-35  R6_2.2.2         quadprog_1.5-5   stringr_1.2.0   
 [9] httr_1.3.1       tools_3.4.2      grid_3.4.2       git2r_0.19.0     withr_2.1.0      iterators_1.0.8  yaml_2.1.14      digest_0.6.12   
[17] codetools_0.2-15 curl_3.0         memoise_1.1.0    stringi_1.1.5    compiler_3.4.2   boot_1.3-20  

当我运行安装包时,我得到的是:

代码语言:javascript
复制
install.packages("quantstrat", repos="https://github.com/braverock/quantstrat.git")
Installing package into ‘C:/Users/augus/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://github.com/braverock/quantstrat.git/src/contrib:
  cannot open URL 'https://github.com/braverock/quantstrat.git/src/contrib/PACKAGES'
Warning in install.packages :
  package ‘quantstrat’ is not available (for R version 3.4.2)
Warning in install.packages :
  unable to access index for repository https://github.com/braverock/quantstrat.git/bin/windows/contrib/3.4:
  cannot open URL 'https://github.com/braverock/quantstrat.git/bin/windows/contrib/3.4/PACKAGES'

我还尝试下载一个以前的版本并安装它,但是没有成功,我从下面的链接获得了它:

0.9.1739.zip

代码语言:javascript
复制
install.packages("C:/Users/augus/Dropbox/Trading/R/quantstrat_0.9.17392.zip", repos = NULL)
Installing package into ‘C:/Users/augus/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  cannot open compressed file 'quantstrat/DESCRIPTION', probable reason 'No such file or directory'
Error in install.packages : cannot open the connection

有人知道我做错了什么吗?

谢谢

奥古斯托

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-11-20 19:07:58

正如在上面的评论中所指出的,为了完整起见,这里有一个答案。

安装quantstrat最新版本最简单的方法是使用devtools通过github安装quantstrat (forge上的quantstrat的版本现已过时):

代码语言:javascript
复制
library(devtools) 
install_github("braverock/quantstrat")
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47379949

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档