为版本 3.4.2 安装 quantstrat 的问题
Issues installing quantstrat for version 3.4.2
我正在尝试在 R 中安装 quantstrat 包。我已经安装了 quantstrat 所需的其他包,下面是我的会话信息。
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
当我 运行 安装包时,这是我得到的:
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'
我也试过下载一个以前的版本安装,但是没有成功,我从下面的link:
http://download.r-forge.r-project.org/bin/windows/contrib/3.2/quantstrat_0.9.1739.zip
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
有人知道我做错了什么吗?
谢谢
奥古斯托
如上评论所述,为完整起见,这里有一个答案。
安装最新版 quantstrat 最直接的方法是通过 github 和 devtools(R-forge 上的 quantstrat 版本现在已经过时):
library(devtools)
install_github("braverock/quantstrat")
我正在尝试在 R 中安装 quantstrat 包。我已经安装了 quantstrat 所需的其他包,下面是我的会话信息。
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
当我 运行 安装包时,这是我得到的:
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'
我也试过下载一个以前的版本安装,但是没有成功,我从下面的link:
http://download.r-forge.r-project.org/bin/windows/contrib/3.2/quantstrat_0.9.1739.zip
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
有人知道我做错了什么吗?
谢谢
奥古斯托
如上评论所述,为完整起见,这里有一个答案。
安装最新版 quantstrat 最直接的方法是通过 github 和 devtools(R-forge 上的 quantstrat 版本现在已经过时):
library(devtools)
install_github("braverock/quantstrat")