Alex Rivera | Logout

Convert MATLAB code to R

Asked 2011-04-03T02:15:39.633
28

Is there a tool for converting MATLAB code to R?

I have a lot of code that needs to be converted from MATLAB to R. It doesn't have to be accurate, but it will be helpful in giving a head start.

Edit
Report

1 Answer

9

No there is no easy conversion. Some will translate nearly exactly, some will translate only with great pain and suffering. At least you'll be using R though! Start here to work out analogous functions and syntax:

http://cran.r-project.org/doc/contrib/R-and-octave.txt

http://cran.r-project.org/doc/contrib/Hiebeler-matlabR.pdf

When you get stuck please ask specific questions here. This is really too vague as it stands, though those reference cards will help with getting started.

answered 2011-04-03T12:57:43.413

Your Answer