# What quant-related functionalities is R lacking compared to commercial software like Mathematica and Matlab?

R that originated as a purely statistical tool has meanwhile blossomed into a comprehensive workbench for different tasks. I am familiar with Mathematica and don't like how it forces a license on you. Also the handling of big data and outputting of tables ins quite cumbersome in my opinion.

Meanwhile R offers (beside the statistical tools) via different packages

• Some support for object oriented coding approach
• Monte Carlo generators galore
• Optimization packages
• Numerical Integration

What functionalities is R still lacking that one needs for everyday quant work? Here "functionalities" also encompass interfaceablity with C++, C#, speed and ease of use.

-
Ok I purged the comments here, I got your points. If you feel this is opinion-based, vote to close (although I disagree). If you have a concrete example of features of R that are lacking, provide them in an answer. – SRKX Apr 4 '14 at 14:28
I retracted my vote to close because as it now stands the question is a valid and interesting one. – vonjd Apr 4 '14 at 15:15
Old, but related: stackoverflow.com/questions/1738087/… – sashkello Apr 6 '14 at 23:10

For Windows - Parallel processing and GPU computing - are two areas. R has numerous packages for parallel processing but all of them require you to replicate the whole environment for each worker which massively degrades the performance of parallel processing and in most real life cases, there is almost no speed up because of the reduced memory available to each worker. It's getting better in R but still far behind Matlab's super easy parfor function that doesn't need to replicate the environment for every worker.

-
This is only true using snow/parallel functionality. multicore on *nix uses fork, which only copies when an object on the worker is altered. – Joshua Ulrich Apr 5 '14 at 20:18
my bad. should have added "Windows" to my answer – uday Apr 5 '14 at 23:50
Still a good point though. – John Apr 6 '14 at 3:45

I use both R and Matlab. In my experience Matlab is often more convenient for optimization problems. For example the excellent convex optimization software cvx is written in Matlab. There are also quite a few quants who publish their code in Matlab.

Also debugging in R can be painful - I like R apart from these quibbles.

-
what about R have you ever tried the optimization packages offered for R ? – Probilitator Apr 7 '14 at 11:45
Yes, I have worked with the 'quadprog' and 'nloptr' libraries in R. I prefer a tightly structured environment such as cvx for optimizations. – Felix Apr 7 '14 at 12:05
what exactly do you mean by "tightly structured" enviroment – Probilitator Apr 7 '14 at 12:50
cvx is a modeling environment for convex opt which uses the same syntax as Matlab for objectives and constraints. See the link in my answer for details. – Felix Apr 7 '14 at 13:16

the main thing that R is lacking is the proper help and product documentation in comparison to Stata, Matlab, SAS and similar commercial software.

there's a package called OxMetrics, which has an interesting algebraic approach to model specification and scripting. it's hard to explain, but when you use it, it saves a lot of time, because it automates a typical model development life-cycle tasks and steps. I haven't seen a similar functionality in R.

UPDATE: if you speak with R enthusiasts they may say that R has all functionality you need through user supplied libraries. it's a truly open source platform, which comes under GNU license. the open source developers never complain for the lack of functionality, because when they do the standard answer is "why don't you write this module and contribute?" and this is the great attitude, which keeps the community engaged. however, this makes your question somewhat poorly defined, because as i noted, one could claim that any functionality is either already there in some form, or "why don't you write this yourself?"

Hence, maybe you should clarify a bit what do you mean by "lacking" functionality. e.g. I doubt that R has anything close to Mathematica's computer algebra capabilities, but I'm pretty sure someone somewhere might have written something to integrate it with REDUCE or other open-source package.

-
R manuals/documentation are worse than Stata? No way. I was forced to use Stata 11 at a prior employer and the manuals and help pages were absolutely atrocious. The documentation that ships with base R is generally very good. The same can't be said for all 5000+ packages on CRAN, but at least you have the source code to inspect. You don't have that with Stata, SAS, Matlab, or OxMetrics. – Joshua Ulrich Apr 4 '14 at 16:45
R's help is pretty much useless unless you know how the function works already – Aksakal Apr 4 '14 at 17:11
That's true. Too bad the help pages don't have examples showing you how to use them... – Joshua Ulrich Apr 4 '14 at 17:27
For the larger packages the authors often provide PDF-files that work as a documentation. There are also a lot of books on R for different fields of application – Probilitator Apr 5 '14 at 7:43
-1 because the documentation is usually very good and the community is active and expert. – user2763361 Apr 5 '14 at 17:38