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 
Rime
  • 912
  • 2
  • 11
  • 39
  • what is the error msg from following that post? for the later method that you tried, the tar.gz that you downloaded is for Unix. it might be because the QuantLib win binary for R >= 3.5.0 has not been built yet. see https://cran.r-project.org/web/packages/RQuantLib/README.html – chinsoon12 Jul 04 '18 at 07:00
  • ERROR: Unix-only package * removing 'C:/Users/frys/Documents/R/win-library/3.5/RQuantLib' – Rime Jul 04 '18 at 07:00
  • When I try installing from zip: `Error: package or namespace load failed for ‘RQuantLib’: package ‘RQuantLib’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version` – Rime Jul 04 '18 at 07:03
  • can you try `install.packages("RQuantLib", type = "source") `. idea came from http://r.789695.n4.nabble.com/R-devel-r73293-and-the-testthat-package-td4745460.html – chinsoon12 Jul 04 '18 at 07:13
  • 1
    I fear the last publicly available windows build for RQuantlib was for R 3.4, c.f. https://www.r-bloggers.com/rquantlib-0-4-4-for-windows/amp/. Somebody has to build it ... – Ralf Stubner Jul 04 '18 at 07:16
  • @chinsoon12 I keep getting : `library("RQuantLib") Error: package or namespace load failed for ‘RQuantLib’: package ‘RQuantLib’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version` – Rime Jul 04 '18 at 07:19
  • maybe u can post a request on the https://github.com/ghrr/drat/issues to request for a R-3.5 build – chinsoon12 Jul 04 '18 at 07:31
  • @chinsoon12 thank you. I posted there...hopefully we can get a reply soon. I appreciate your help. Also tried installing this way without any luck: `install_github("eddelbuettel/rquantlib")` https://stackoverflow.com/questions/50026518/package-rquantlib-is-not-available-for-r-3-5-0 – Rime Jul 04 '18 at 07:42
  • didn't help much. btw, Dirk's comment (in the latest SO link that you posted) says it all. my guess is you need to build QuantLib in windows first (see https://www.quantlib.org/install/vc10.shtml) then build the RQuantLib from Dirk's github then post the zip in ghrr – chinsoon12 Jul 04 '18 at 07:47
  • see also https://github.com/eddelbuettel/rquantlib/issues/56 – chinsoon12 Jul 04 '18 at 07:54
  • related to https://stackoverflow.com/questions/5240827/install-rquantlib-on-microsoft-windows – chinsoon12 Jul 06 '18 at 23:34

1 Answers1

0

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')
Rime
  • 912
  • 2
  • 11
  • 39