Skip to content

Call R from Fortran

2 messages · Mulholland, Tom, Brian Ripley

#
I don't know, but I do know that if you search the mailing list the answer is there.

One place to start might be http://finzi.psych.upenn.edu/R/Rhelp02a/archive/50776.html

I found this by searching for "fortran" on the mailing list.

You might also read the posting guide. The link above refers to a particular operating system which may or may not be be the one you are using. I think you might also need to read "Writing R Extensions"

Tom
#
On Thu, 19 May 2005, Mulholland, Tom wrote:

            
That is about calling Fortran from R, not the subject of this question.
(There are many other more authoritative sources for that.)
This can only be done by combining Fortran and C, as R functions need R 
objects as arguments and return R objects.  R objects are defined in C 
headers and use structures not in Fortran 77.  But it can be done, and 
"Writing R Extensions" is a good place to start, especially the 
OS-specific sections on writing new front ends.