Re: [R] Fortran Code to R Code

2007-11-28 Thread Duncan Murdoch
On 11/28/2007 12:54 PM, Dave Roberts wrote: > Bryan, > > The previous responses will point you in the right direction. I > have found, however, that it takes a while to get used to the > requirements, and there are many possible sources of error. This is true, and the advice below is all

Re: [R] Fortran Code to R Code

2007-11-28 Thread Dave Roberts
Bryan, The previous responses will point you in the right direction. I have found, however, that it takes a while to get used to the requirements, and there are many possible sources of error. 1) You have to convert the main program to a subroutine. Any arrays declared in the main progr

Re: [R] Fortran Code to R Code

2007-11-28 Thread Scionforbai
help.start(), then "Writing R extensions". You can link fortran subroutines to R by compiling them in a shared library (.so or .dll depending on your system) by the command: R CMD SHLIB file1.f file2.f -o myfortransubroutines.so and then from R you first dyn.load("myfortransubroutines.so") and

Re: [R] Fortran Code to R Code

2007-11-28 Thread Bjørn-Helge Mevik
The `Writing R Extensions', chapter 5 `System and foreign language interfaces' tells you how to compile and run Fortran code from R. -- Bjørn-Helge Mevik __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read t

[R] Fortran Code to R Code

2007-11-28 Thread Bryan Klingaman
How do you convert Fortran Code to R Code to use and execute in R? Or how do you take Fortran code and make it run in R? So what I'm getting at is, I have some code in fortran and I want to be able to run that same code for R. Please email me back and let me know how to do that, thanks.