2

I tried to install RQuantLib from RStudio, but it has given me problems.

I updated my R version to 3.3.1 and tried to use the usual way of installing a package (install.packages("RQuantLib")) as recommended on the webpage of the author (http://dirk.eddelbuettel.com/code/rquantlib.html). However, it gave the following error message :

Warning in install.packages :
package ‘RQuantLib’ is not available (for R version 3.3.1)

I tried installing it on different computers too, but I got the same error message.

Does anyone else experience the same problem or has any idea what could have gone wrong? Thank you!

mnille
  • 1,328
  • 4
  • 16
  • 20
  • Which OS? Tell us your `sessionInfo()` – J_F Oct 04 '16 at 10:12
  • 1
    R version 3.3.1 (2016-06-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_3.3.1 – András Łukasz Chabin Oct 04 '16 at 10:15

1 Answers1

10

You are on Windows per your comment. As per this section of the README.md

Windows Binaries

Starting with release 0.4.3, binaries are provided via the ghrr drat repo and can be installed as

R> drat::addRepo("ghrr") # maybe use 'install.packages("drat")' first
R> install.packages(RQuantLib)

you can install a pre-built Windows binaries -- which I just updated for QuantLib 1.8.1 -- from this non-CRAN repo.

Edit: Apparently one now has to say type="binary" even on Windows. Here is a log from a virtual machine I keep:

R> drat::addRepo("ghrr")
R> options("repos")
$repos
                          CRAN                           ghrr 
 "https://cloud.r-project.org" "https://ghrr.github.io/drat/" 

R> install.packages("RQuantLib", type="binary")
Installing package into c:/opt/R-library
(as lib is unspecified)
trying URL 'https://ghrr.github.io/drat/bin/windows/contrib/3.3/RQuantLib_0.4.3.zip'
Content type 'application/zip' length 7993848 bytes (7.6 MB)
downloaded 7.6 MB

package RQuantLib successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\[redacted]\AppData\Local\Temp\RtmpAHvBmo\downloaded_packages
R> 

I'll update the README.md web page.

Community
  • 1
  • 1
Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • I tried this again on two computers and even an online version of RStudio, but still the same error message. Anyhow, I believe that the problem is on my side. Thank you for your help anyways – András Łukasz Chabin Oct 04 '16 at 10:33
  • I edited my answer -- apparently, one now needs to add `, type="binary"` to the `install.packages()`. I added the output from a successful installation in a Windows (virtual) machine. – Dirk Eddelbuettel Oct 05 '16 at 02:58
  • That was the intent all along so thanks to you for alerting me to the need for `type="binary"` ! – Dirk Eddelbuettel Oct 05 '16 at 14:02
  • Now, this being StackOverflow, please consider "accepting" (click on tickmark only you as the person asking the question sees) and/or "upvoting" (click on upward-facing triangle). You get points for accepting too. – Dirk Eddelbuettel Oct 05 '16 at 14:03