QuantLib-R potential problem and fix

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

QuantLib-R potential problem and fix

Tawanda Gwena
Dear all,

I was having problems running my QuantLib in R. The most basic function,
    todaysDate <- Date(15, "May", 1998)
was failing, saying it can't find function 'f'.

The problem is in the definition of Date in the file QuantLib.R (at line 2088). It uses the condition
    extends(argtypes[1], 'integer') 

The solution is to change 'integer'  to 'numeric'. This appears twice more in that function definition. After that everything works as expected (so far).

I'm running QuantLib-SWIG 1.0, QuantLib-1.0 and R 2.10.1 on a Mac.

I hope others find this useful.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users