[R] [Rd] Re Bessel functions of complex argument
baptiste auguie
ba208 at exeter.ac.uk
Sat Nov 22 13:34:31 CET 2008
I thought I'd share a few workaround routes I've considered (my
attempt at using Amos' Fortran routines failed miserably -- if anyone
is interested i can explain what I tried),
- Ryacas seems to provide a very simple way to evaluate bessel
functions with complex argument,
> yacas("N(BesselJ(2, 1+I))")
> Complex(0.415798869439e-1,0.247397641513);
Not sure yet how fast this is, and how to get data in/out in R format
but it looks promising.
- Similarly, I get the idea that Sage could provide an interface to
Maxima or Pari and return the desired value. There doesn't seem to be
much of a documentation centred on the use of Sage with R, though.
- Octave has implemented the Amos code (so has Matlab). This should
make it possible to call Octave and get the result back in R (Roctave
package I believe), or better yet, get inspiration to properly use the
underlying Fortran code.
Baptiste
On 9 Nov 2008, at 12:22, baptiste auguie wrote:
> Dear all,
>
> I'm writing a code that requires Bessel functions with complex
> argument.
> Searching the list, I found the continuation of a thread I initiated
> a few
> months ago:
>
> http://tolstoy.newcastle.edu.au/R/e4/devel/08/03/0746.html
>
> As I understand, the most promising option would be to use the
> fortran or C
> implementation of Amos,
>
> http://portal.acm.org/citation.cfm?id=214331&dl=GUIDE&coll=GUIDE&CFID=9717168&CFTOKEN=75957024
>
>
> Sadly, my limited programming skills don't include any knowledge of
> fortran,
> and I have never managed to link external code to R functions (i'm
> missing a
> simple example based tutorial, R-ext overwhelms me with information).
>
> A few questions for anyone interested:
>
> - Does the aforementioned fortran code lends itself to an easy
> interfacing
> with R? (in other words, do I stand a chance in less than 10 years?)
>
> - Is anyone willing to help me with this? The package is hosted on R-
> forge
> and i could take care of the documentation, etc.
>
> - Is there a package I've missed that already implements this? (one
> can
> dream)
>
>
> Many thanks,
>
>
> baptiste
>
> _____________________________
>
> Baptiste Auguié
>
> School of Physics
> University of Exeter
> Stocker Road,
> Exeter, Devon,
> EX4 4QL, UK
>
> Phone: +44 1392 264187
>
> http://newton.ex.ac.uk/research/emag
> ______________________________
>
> [[alternative HTML version deleted]]
>
> <ATT00001.txt>
_____________________________
Baptiste Auguié
School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK
Phone: +44 1392 264187
http://newton.ex.ac.uk/research/emag
More information about the R-help
mailing list