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 -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 2/21/12 12:10 PM, "Xia.Li" <oddity...@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 >program. >Is there anyway that R can call such fortran programming? Or I should >modify >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 >package... > >Xia > >-- >View this message in context: >http://r.789695.n4.nabble.com/R-package-built-with-Fortran-code-tp4408150p >4408150.html >Sent from the R help mailing list archive at Nabble.com. > >______________________________________________ >R-help@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.