RE: [R] Call R from Fortran

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 19 May 2005 - 17:32:19 EST

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

> 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

That is about calling Fortran from R, not the subject of this question. (There are many other more authoritative sources for that.)

> 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"

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.

>> From: r-help-bounces@stat.math.ethz.ch
>> [mailto:r-help-bounces@stat.math.ethz.ch]On Behalf Of Samiran Sinha
>> Sent: Thursday, 19 May 2005 7:24 AM
>> To: r-help@stat.math.ethz.ch
>>
>> I need to call a R function from Fortran 77 program. How will I do that
>> exactly? I will grately appreciate any help. Sincerely,

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu May 19 17:37:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:51 EST