0

I am trying to install the quantstrat package in R. I already installed the other packages necessary for quantstrat, below is my session info.

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  

when I run the install packages this is what I get:

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'

I have also tried to download a previous version and install it, but with no success, I got it from the followin 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

Does someone know what I am doing wrong?

Thanks

Augusto

FXQuantTrader
  • 6,821
  • 3
  • 36
  • 67
Augusto
  • 51
  • 1
  • 6

1 Answers1

0

As noted in the comments above, for completeness here is an answer.

The most straightforward way to install the latest version of quantstrat is via github with devtools (the version of quantstrat on R-forge is now out of date):

library(devtools) 
install_github("braverock/quantstrat")
FXQuantTrader
  • 6,821
  • 3
  • 36
  • 67
  • Could you add additional details to your answer. Your answer was flagged for its length and content. – www139 Nov 20 '17 at 19:43