Matlab to R ?
Martin Maechler wrote:
Probably everyone agrees that a Matlab -> R translation cannot
(and probably should not) be automated to full extent. On the
other hand, Paul Gilbert's "ex" script should be made into a
perl or python {or "octave" !?} script and could be enhanced
considerably, probably.
... Perhaps I should have qualified the extent of the translation done by my script somewhat more, but I'm not sure how much pay back there is from doing a lot better job of the translation. (BTW, the script probably pre-dates python and almost pre-dates perl.) I think you need to distinguish at least three groups of interest in R/Matlab: 1/ Running Matlab code from R (Duncan Temple Lang's approach). 2/ Keeping a common code base to run in both R and Matlab. As far as I know, no one is working on tools to do this, But Jim Ramsay's functional data analysis library is based on this approach. 3/ One time conversion from Matlab to R. My script was for the last purpose, but in addition I should add that it is really meant for the case were one intends to keep developing the R version of the code once it is translated. If you just want a translation that runs, then it is not very good (perhaps very bad). If you want good R code with clean idioms, then even a running translation is going to be pretty bad. So, you need to do a fair amount of work even if you get a running translation. My script does a certain amount of the boring part, but there is still a lot of work necessary to get good R code. Paul Gilbert -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._