[R] Matlab user: Octave, scilab or R-project?

Spencer Graves spencer.graves at pdf.com
Thu May 1 20:25:18 CEST 2008


      At some level, it depends on what she wants:  For maximum Matlab 
compatibility, she doubtless wants something like Octave (or Scilab). 

      However, if she's looking to the future or she wants access to 
other people's work, she might want to consider R.  I've been using both 
Matlab and R almost daily for 16 months now, and I'd like to offer a 
couple of comparisons.  First, I've heard people who use both say they 
love Matlab's simplicity and never developed an intuition about S-Plus 
(or R).  I'm the opposite:  I'm still struggling with Matlab's cell 
arrays and struct, two different concepts that both translate roughly as 
lists.  However, in Matlab, it is very difficult to add names and other 
attributes to vectors or matrices.  My primary collaborator who loves 
Matlab instead creates a "struct" with fields "rownames", "colnames" and 
"value".  To add 1 to the values of a struct A, I write "1+A.value".  In 
R, I write "1+A". 

      Beyond this, R is increasingly the language of choice for new 
statistical algorithm development.  At this moment, there are 1377 
contributed packages downloadable from the Comprehensive R Archive 
Network (CRAN), and that number is continually growing as the quality of 
many packages is improving.  "RSiteSearch" makes it fairly easy to find 
things in R -- and R-Help provides better tech support than I've ever 
gotten for any commercial software. 

      Twice in the past year, I was asked to get Matlab add-on 
packages.  Each time, it took me a couple of days to decide if I really 
needed to spend that money.  Then another couple of days of my time 
spread out over a month getting the required official permissions, 
getting a quote from Mathworks, getting a purchase order cut and 
approved, etc.  With R, all I need is an Internet connection and click 
Packages -> "Install packages" from within Rgui.  It's done in less that 
a minute with no cash outlay vs. a month and a thousand dollars for 
software that I may never use! 

      Beyond that, the process of package development has increased 
substantially my productivity in software development.  I now create 
documentation with test cases first.  Then I write the code.  After 
that, running "R CMD check", etc., usually tells me if a change to "A" 
breaks "B".  I don't have than in Matlab. 

      Spencer Graves     

Johannes Hüsing wrote:
> schoappied <schoappied at gmail.com> [Thu, May 01, 2008 at 06:00:51PM CEST]:
>   
>> what is a good alternative for matlab?
>>     
>
> Octave is generally said to be the alternative.
>
>



More information about the R-help mailing list