[R] calling Matlab
Timothy H. Keitt
tklistaddr at keittlab.bio.sunysb.edu
Wed Jul 24 19:50:23 CEST 2002
Once the world realizes the importance of a common runtime engine, this
will all be child's play. You'll just attach your matlab and R sessions
to the same resource pool and each will see the other's data. Data
storage and representation issues should be an OS (really common
middleware) service; why we keep rewriting it all from scratch is beyond
That said, it would be strait forward to write a matlab-compatible
module that call R's eval in C code. Going the other way might be also
easy, but I can't remember how and if matlab exports its header files.
But its probably easier still (although not elegant) to dump ascii files
from matlab and load them in R.
On Wed, 2002-07-24 at 11:50, Brian Scholl wrote:
> To clarify, based on the other responses that I've gotten: I already have a
> version of Matlab on my pc (it's the student version, but it does what I
> need - I've been thinking to buy the complete version as well if I can rob a
> bank sometime soon) and I've got Gauss code I wrote when I was working on
> that system for the computation, say, of GMM models. Anyway, Barry Quinn's
> recent Estimation and Tracking of Frequency book has some great matlab code
> and there are many programs that I've written on my own that are just a pain
> to do over again in R. The main problem is that I'd like to be able to
> easily transfer data back and forth between the two systems in code (and
> maybe call a few of my matlab routines in R too).
> For example (in case I'm babbling), I might compute the periodogram using R,
> then use Chiu's (1989) procedure I'd determine peaks. Using those
> frequencies I could estimate a sum-of-cosines regression in Matlab very
> easily and nicely using Quinn's code, which would then give me the residuals
> from the regression, the periodogram of which I could plot very nicely in R.
> I'd love to do all this without 1. saving + loading the data umpteen times
> manually (then running the code on the respective systems in sequence); or
> 2. reprogramming everything in R or Matlab.
> Thank you for all your help.
> ----- Original Message -----
> From: "Liaw, Andy" <andy_liaw at merck.com>
> To: "'Brian Scholl'" <scholl at yubc.net>; "Rhelp questions list"
> <r-help at stat.math.ethz.ch>
> Sent: Wednesday, July 24, 2002 2:59 PM
> Subject: RE: [R] calling Matlab
> > Both Matlab and Gauss are proprietary software. Even before considering
> > technical possibility of such link, you may want to read the license
> > agreements for those packages and see if it's even legal to do so.
> > Just my $0.02...
> > Andy
> > > -----Original Message-----
> > > From: Brian Scholl [mailto:scholl at yubc.net]
> > > Sent: Tuesday, July 23, 2002 6:41 AM
> > > To: Rhelp questions list
> > > Subject: [R] calling Matlab
> > >
> > >
> > > Is there a way to call Matlab and Gauss code in R? I see
> > > functions that
> > > work for C/FORTRAN, but not for other languages.
> > >
> > > Brian
> > >
> > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> > > -.-.-.-.-.-.-.-.-
> > > 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
> > > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> > > _._._._._._._._._
> > >
> > --------------------------------------------------------------------------
> > Notice: This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that
> may be confidential, proprietary copyrighted and/or legally privileged, and
> is intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please immediately return this by e-mail and then delete
> 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
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
More information about the R-help