Murray Jorgensen <m...@stats.waikato.ac.nz> wrote:

I'm going to try my hand at converting some Fortran programs to R. Does
anyone know of any good articles giving hints at such tasks? I will post
a selective summary of my gleanings.

Presuming you don't mean .Fortran(), I have gone both ways. Aside from the obvious fact that a single R vectorized command can replace either just a loop or an entire Fortran subroutine, I don't have any deep insights. I simply did a line-by-line translation to R, confirmed the code still worked, then looked for simple optimizations/refactorings.

If you have a lot of code to port, and are hinting you would like an automated tool, I think you are out of luck ;) There is a Fortran to Lisp translator (f2cl), but I think the resulting code will not get you a lot closer (it is aimed at compilation).

Cheers, David Duffy.
--
| David Duffy (MBBS PhD)                                         ,-_|\
| email: dav...@qimr.edu.au  ph: INT+61+7+3362-0217 fax: -0101  /     *
| Epidemiology Unit, Queensland Institute of Medical Research   \_,-._/
| 300 Herston Rd, Brisbane, Queensland 4029, Australia  GPG 4D0B994A v

______________________________________________
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.

Reply via email to