Skip to content
Prev 246448 / 398502 Next

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

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: