问题
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!
回答1:
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.
来源:https://stackoverflow.com/questions/39849542/installation-of-rquantlib