[R] R package built with Fortran code

MacQueen, Don macqueen1 at llnl.gov
Thu Feb 23 00:39:05 CET 2012

As far as I know, you must convert your main program into a subroutine.

In my experience, this consist mostly if not entirely of converting user
input from prompts to subroutine arguments.


Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550

On 2/21/12 12:10 PM, "Xia.Li" <odditylee at gmail.com> wrote:

>Hi R users,
>I'm trying to build an R package and most of the work have been done in
>Fortran programming.
>I looked for help for a while and seems like R can only call Fortran
>subroutines. Now my fortran code has modules, subroutines and main
>Is there anyway that R can call such fortran programming? Or I should
>the coding and form them into subroutines before let R call them?
>Thank you very much!
>P.S. I'm not a Fortran user, just have to do such work and build this
>View this message in context:
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list