[R] [R-downunder] Converting Fortran or C++ etc to R

Michael Sumner mdsumner at gmail.com
Wed Jan 5 12:01:14 CET 2011

Hi Murray, at first I thought you meant compiling existing Fortran or
C++ for use in R with .Fortran() and so on, but do you mean literal
conversion from Fortran  to just pure R code? I'm assuming pure R code
for the rest of this:

I've tried with some fairly simple C++ and C code, and that's been
fairly easy - there are a lot of details you can ignore and just try
to figure out the algorithm. It's nice if you have running software so
you can compare outputs, but I did once eventually figure out some
Pascal code from an old text book - it had enough actual example data
printed in the book that allowed me eventually to figure it out. There
were people around me who had once compiled Pascal, but it didn't
sound like it was going to be much fun.

Sometimes C and C++ chunks can be copied over directly and used with
very few changes, but it will just depend. Good luck, and I would just
jump in the deep end and send in questions if you get stuck.

Cheers, Mike.

On Wed, Jan 5, 2011 at 11:02 AM, Murray Jorgensen
<maj at 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.
> Cheers,  Murray
> --
> Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
> Department of Statistics, University of Waikato, Hamilton, New Zealand
> Email: maj at waikato.ac.nz                                Fax 7 838 4155
> Phone  +64 7 838 4773 wk    Home +64 7 825 0441   Mobile 021 0200 8350
> --
> R-downunder at stat.auckland.ac.nz
> http://www.stat.auckland.ac.nz/r-downunder
> To unsubscribe send an email to R-downunder-unsubscribe at stat.auckland.ac.nz

Michael Sumner
Institute for Marine and Antarctic Studies, University of Tasmania
Hobart, Australia
e-mail: mdsumner at gmail.com

More information about the R-help mailing list