Search code examples
rinstall.packages

installing RQuantLib on (Windows) R version 3.5.1


I am having issues installing RQuantLib. I recently upgraded R to version 3.5.1 and now it wont install.

I have tried following directions from : This post

Unfortunately it does not work. I have tried downloading the .tar from here and then manualling installing from there but here is the output:

    install.packages("C:/Users/frys/Google Drive/R/RQuantLib_0.4.4.tar.gz", repos = NULL, type = "source")

Installing package into ‘C:/Users/frys/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
ERROR:  Unix-only package
* removing 'C:/Users/frys/Documents/R/win-library/3.5/RQuantLib'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘C:/Users/frys/GOOGLE~1/R/RQuantLib_0.4.4.tar.gz’ had non-zero exit status

library('RQuantLib')
Error in library("RQuantLib") : there is no package called ‘RQuantLib’

# I have also tried the following

install.packages('RQuantLib',type="binary")
Installing package into ‘C:/Users/frys/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
  unable to access index for repository https://ghrr.github.io/drat/bin/windows/contrib/3.5:
  cannot open URL 'https://ghrr.github.io/drat/bin/windows/contrib/3.5/PACKAGES'
Warning in install.packages :
  package ‘RQuantLib’ is not available (as a binary package for R version 3.5.1)

library('RQuantLib')
Error in library("RQuantLib") : there is no package called ‘RQuantLib’

The package was working fine before I upgraded R... Any help is appreciated.

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

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

other attached packages:
 [1] drat_0.1.4                 RSQLite_2.1.1              DBI_1.0.0                 
 [4] rvest_0.3.2                xml2_1.2.0                 PerformanceAnalytics_1.5.2
 [7] highfrequency_0.5.3        data.table_1.11.4          XML_3.98-1.11             
[10] quantmod_0.4-13            TTR_0.23-3                 xts_0.10-2                
[13] zoo_1.8-2                  doParallel_1.0.11          iterators_1.0.9           
[16] foreach_1.4.4              pbapply_1.3-4              plyr_1.8.4                
[19] jsonlite_1.5               RCurl_1.95-4.10            bitops_1.0-6              
[22] derivmkts_0.2.3           

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.17     compiler_3.5.1   tools_3.5.1      digest_0.6.15    bit_1.1-14      
 [6] memoise_1.1.0    lattice_0.20-35  curl_3.2         httr_1.3.1       bit64_0.9-7     
[11] grid_3.5.1       R6_2.2.2         blob_1.1.1       magrittr_1.5     codetools_0.2-15
[16] mnormt_1.5-5     quadprog_1.5-5 

Solution

  • Please read : this post on troubleshooting.

    I had to first install Rtools Rtools35.exe. After the installation was completed, I then went into my R-console and typed the following:

    #install remotes
    install.packages('remotes');library('remotes')
    
    # install RQuantLib: Installation took a few minutes
    install_github("eddelbuettel/rquantlib")
    
    # After I ran this, RQuantLib was ready to use
    library('RQuantLib')