The HUGE edge of Matlab over R is the Matlab Coder Toolbox. Converting R script code to C++/C?

(Last Updated On: June 26, 2012)The HUGE edge of Matlab over R is the Matlab Coder Toolbox. Converting R script code to C++/C?

I was reading the various links from the fantastic Stack Overlflow:

http://stackoverflow.com/questions/9154383/converting-loop-from-r-to-c-using-rcpp

http://stackoverflow.com/questions/10089754/converting-models-in-matlab-r-to-c-java

It seems the RCPP R package always come up in name. It is that or a derivative like RCPPArmadillo. I have played with RCpp which is really good. I am very impressed with it but when you look  at the equivalent from the Matlab world, it seems that your choices are Matlab Builder JA or Matlab Builder NE toolboxes. For those new to it, you also need to include the Matlab Compile Runtime which can lead your target application potentially extra heavy so why go there. Also, the code you need to develop to be compliant with the MCR is ugh…. how shall we say?  Extra long and wonky. Boo to that on that one.

I have experimented the various equivalent R packages of RCPP/Rinside, RJava, and R.Net which work really well. You can also make direct calls into R from these languages with little hassle compared to Matlab’s way. It seems slightly fast also since the loading of R can be very lightweight. Very cool.

But that brings me to a very important question that Matlab does have an edge. It is called Matlab Coder Toolbox which is very cool. Introduced last year, it allows you to truly convert your Matlab M Script into C or C++. It is very cool but offers limited support for the Matlab toolboxes. The functions I wanted to use were not supported but the current version of Matlab might address that. If your M script does not use any toolboxes, you can definitely use this Coder toolbox as an option. It is very cool in how it works but it is very expensive. Try $6000 but it might be worth it since you no longer need to hire a $100+K C++ developer. This is one option that Matlab has which R does not.

I hope someone can crack this code despite using something like RCpp. I think a tool to convert to C++ like the Matlab Coder would be completely awesome but I am sure this would not be a cheap R package. The amount of work would be huge.
Try joining my New R/Matlab users Meetup group.