 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Johnny Nguyen
RE: Calling a function from an Add-on library [ reply ] 2009-01-12 22:47
|
Ahh, caught my mistake. Should be:
e = r.EuropeanOption("call", 100, 100, 0.01, 0.03, 0.5, 0.4)
Not
e = q.EuropeanOption("call", 100, 100, 0.01, 0.03, 0.5, 0.4)
Thanks!
|
By: Johnny Nguyen
RE: Calling a function from an Add-on library [ reply ] 2009-01-12 22:17
|
Alex,
Thanks for your gem! I'm currently using it in a Rails application. Installation on Fedora 10 64 bit went fine. I'm trying to use the RQuantLib library but I'm getting an undefined method error when trying to use an RQuantLib method.
r = RSRuby.instance
q = r.library("RQuantLib")
e = q.EuropeanOption("call", 100, 100, 0.01, 0.03, 0.5, 0.4)
This gives me 'undefined method 'EuropeanOption''.
Any help would be great.
Thanks!
Johnny
|
By: Alex Gutteridge
RE: Calling a function from an Add-on library [ reply ] 2008-03-31 10:44
|
Calling the library function should work like any other. So,
RSRuby.instance.library("packagename")
should do what you want. Some packages that use S3/4 methods won't work with the normal method dispatch, though you can always get them to work using eval_R.
AlexG
|
By: Gabe Plaxico
Calling a function from an Add-on library [ reply ] 2008-03-31 10:08
|
How does one call a function from an add-on library in rsruby? In R we have to initialize the add-on library with "library(add-on_name)" then we have access to the desired function. What do we do in rsruby to get access to these libraries? Thanks in advance.
- Gabe
|
|
 |