DSPRelated.com
Forums

:1,$s/Matlab/R/g

Started by Bob Cain April 1, 2004
I've been recently studying the R language as a possible 
free and cross platform replacement for Matlab.  I am 
absolutely in love with this language.  While it has a more 
traditional syntax and representation, many of the concepts 
such as the powerful indexing operations, are taken from my 
old favorite APL.  It is a real language, not a hack as I 
consider Matlab to be from both a syntactic and symantic 
standpoint.  It is fully OO and that is not grafted on, it 
is fundamental, but as with any really good OO system can be 
ignored for the older methods of coding.

Unfortunately it only supports 1-origin indexing other than 
through its OO capabilities but that may not be as big a 
hinderence as it is with Matlab.  It was originated as a 
language and library for statistical research and derives 
from S but the language itself contains virtually no trace 
of that origin and the statistical library is nothing short 
of phenomenal and is a perfect adjunct to DSP.

I invite others to look at it and possibly consider signing 
up to help create a Matlike DSP library for it that contains 
the set of functions that Matlab provides with its DSP add 
on.  The link is:

   http://www.r-project.org/

Comments?



Bob
-- 

"Things should be described as simply as possible, but no 
simpler."

                                              A. Einstein
Bob Cain wrote:
> Comments?
1,$ can be replaced with %. I dunno how to write that as a regular expression though. It might be tricky! I am not a user of Matlab. Nor do I use Rlab, scilab, or octave, but if I needed one of these, Matlab would not be my first choice. Open Source Software is phenomenal, and I firmly believe it will soon dominate. In addition to the math packages already mentioned, consider OpenOffice.org, Mozilla, Linux, apache, and The Gimp. These are Open Source replacements for MS Office, Internet Explorer, Windows, ISS, and Photoshop. There's also MySQL (a database server), PHP (a web scripting language), and gcc (a C compiler). If anyone's curious but doesn't want to install a new OS, look at Knoppix. Also, all of the above (except Linux) run well on Windows too. The sooner the world switches over, the sooner I can run VisualDSP++ on a Linux box! Free does not equal bad quality. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 Dyslexics of the world, UNTIE!
On Thu, 01 Apr 2004 11:12:45 -0800, Bob Cain wrote:
> I've been recently studying the R language as a possible > free and cross platform replacement for Matlab.
I have hoped for a long while that the numerical extensions to Python (numPy) might fill that role, but the last time I looked it seemed somewhat incoherent, with a few different versions. There also wasn't much of a library of significant numerical algorithms to go with it. Pity. I'll certainly have a look at R. Thanks. Have you ever looked at numPy, to be able to comment on the differences? Of course, the dark-side is that octave pretty much *is* matlab, although less complete and less shiny, and most of my old scripts and functions just work. My colleagues use Matlab too. Both of these are strong reasons not to use something that doesn't at least look like Matlab. Thanks for the heads-up. Cheers, -- Andrew
Andrew Reilly wrote:
> > I'll certainly have a look at R. Thanks. Have you ever looked at numPy, > to be able to comment on the differences?
A while back I looked at Python and while I liked it better than Matlab I still wasn't too taken with it and lost interest. R is another thing altogether. I don't remember enough about Python to comment specifically, though.
> > Of course, the dark-side is that octave pretty much *is* matlab, although > less complete and less shiny, and most of my old scripts and functions > just work. My colleagues use Matlab too. Both of these are strong > reasons not to use something that doesn't at least look like Matlab.
A pretty reasonable trick would be to do up a Matlab parser/generator that could output R. I really doubt that would be very difficult starting from a working parser. I wonder if that exists anywhere. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein
Bob Cain wrote:
> Andrew Reilly wrote: > >> >> I'll certainly have a look at R. Thanks. Have you ever looked at numPy, >> to be able to comment on the differences? > > > A while back I looked at Python and while I liked it better than Matlab > I still wasn't too taken with it and lost interest. R is another thing > altogether. I don't remember enough about Python to comment > specifically, though. > >> >> Of course, the dark-side is that octave pretty much *is* matlab, although >> less complete and less shiny, and most of my old scripts and functions >> just work. My colleagues use Matlab too. Both of these are strong >> reasons not to use something that doesn't at least look like Matlab. > > > A pretty reasonable trick would be to do up a Matlab parser/generator > that could output R. I really doubt that would be very difficult > starting from a working parser. I wonder if that exists anywhere. > > > Bob
Certainly the Octave source would have one -- and it's open. Whether it would be more work to roll your own or use what's in Octave is not a moot question, since Octave is an interpreter at some level. It does do some sort of compilation, but I'm just a user, so I have no concrete idea. I suppose I should try R, even though my fingertips know the Matlab scripting language (sigh). -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott wrote:

> Bob Cain wrote: > >> Andrew Reilly wrote: >> >>> >>> I'll certainly have a look at R. Thanks. Have you ever looked at >>> numPy, >>> to be able to comment on the differences? >> >> >> >> A while back I looked at Python and while I liked it better than >> Matlab I still wasn't too taken with it and lost interest. R is >> another thing altogether. I don't remember enough about Python to >> comment specifically, though. >> >>> >>> Of course, the dark-side is that octave pretty much *is* matlab, >>> although >>> less complete and less shiny, and most of my old scripts and functions >>> just work. My colleagues use Matlab too. Both of these are strong >>> reasons not to use something that doesn't at least look like Matlab. >> >> >> >> A pretty reasonable trick would be to do up a Matlab parser/generator >> that could output R. I really doubt that would be very difficult >> starting from a working parser. I wonder if that exists anywhere. >> >> >> Bob > > > Certainly the Octave source would have one -- and it's open.
If you know enough to be able to dig that out, I'd really apprecitate it.
> I suppose I should try R, even though my fingertips know the Matlab > scripting language (sigh). >
There you go. Matlab always has felt like a scripting language to me. R on the other hand looks like a real language. My fingers don't know it yet either but I've got a feeling they're going to learn. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein