Reputation: 11
I've recently updated all packages. Now RQuantLib fails to load. What can I do? I've tried to remove and reinstall the package in version 0.3.12 both from CRAN and from the source file, neither helps.
> library(RQuantLib)
Error : .onLoad failed in loadNamespace() for 'RQuantLib', details:
call: if (is.character(qc) && nchar(qc) > 1) {
error: missing value where TRUE/FALSE needed
In addition: Warning message:
running command 'bash -c 'type -p quantlib-config' 2>/dev/null' had status 1
Error: package or namespace load failed for ‘RQuantLib’
I'm working in RStudio with R 3.0.2 on Mac OS Mavericks. What can I do?
Upvotes: 1
Views: 387
Reputation: 21
I had the same issue and after some hours of struggle I manage to use something not very rigorous but it works!
It seems that R has some issues evaluating system("bash -c 'type -p quantlib-config'")
.
After having installed QuantLib, typing the command bash -c 'type -p quantlib-config'
in Terminal gives us the path of our quantlib-config which is for me /opt/local/bin/quantlib-config
.
So I went back to my source folder for RQuantLib (version 0.4.0) and replaced qc in file R/inline.R
by:
qc <- as.character("/opt/local/bin/quantlib-config")
and rebuilt the package using the terminal command R CMD install RQuantLib/
.
As I said, not very sexy but it works.
A restart of R and Rstudio is necessary.
Hope it helps the next ones and that this will be corrected in future versions.
Upvotes: 2