Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to use R within Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100798] Re: How to use R within Mathematica
  • From: sashap <pavlyk at gmail.com>
  • Date: Sun, 14 Jun 2009 05:40:28 -0400 (EDT)
  • References: <gr0glf$96a$1@smc.vnet.net> <h0vtov$79r$1@smc.vnet.net>

On Jun 13, 5:07 am, Erich Neuwirth <erich.neuwi... at univie.ac.at>
wrote:
> I stumbled upon your question.
> On Windows, it is easy to use R from within Mathematica.
> You just have to download and install the
> statconnDCOM server (free for noncommerial use)
> from rcom.univie.ac.at
>
> The following piece of code shows how you than
> can use R from within Mathematica.
>
> Needs["NETLink`"]
> myR = CreateCOMObject["RCOMServerLib.StatConnector"]

It seems like the actual COM object should be different. I had success
with

myR = CreateCOMObject["StatConnectorSrv.StatConnector"]

--Sasha

> myR@Init["R"]
> myR@SetSymbol["xxx",12321]
> result1=myR@GetSymbol["xxx"]
> myR@EvaluateNoReturn["randmat<-matrix(rnorm(100),10)"]
> rmat=myR@GetSymbol["randmat"]
> result2=myR@Evaluate["solve(matrix(1:4,2))"]
>
> Dobromir Tzotchev wrote:
> > I would like to use functions from some R libraries within Mathametica.=
 I have seen that there exists a software called RLink but it is not readil=
y available.  Is the way to go to use the R functionaly in C/C++  and t=
hen use MathLink to call the C/C++ functions?
>
> > Thanks.      



  • Prev by Date: Re: Inverse / Laplace Transform Halved
  • Next by Date: Re: Inverse / Laplace Transform Halved
  • Previous by thread: Re: How to use R within Mathematica
  • Next by thread: Re: How to use R within Mathematica