[R] R - API ?

Yoon, Hoon (CICG - NY Program Trading) HYoon at exchange.ml.com
Fri Jan 29 22:45:55 CET 1999


   I thought that this was very close to what I was asking before. So, I
just pulled some info together for everyone's benefit, especially the stuff
Guido mentioned. I hope that people who are interested will keep each other

S. Hoon Yoon                   (Quant)                    Merrill Lynch
Equity Trading 
yelled at yahoo.com hoon at bigfoot.com(w)
"Miracle is always only few standard deviations away, but so is
* Expressed opinions are often my own, but NOT my employer's.
"I feel like a fugitive from the law of averages."    Mauldin

The source to Guido's windows version is on CRAN, cunningly hidden
under "Binaries" in the 
 bin/ms-windows/win-32-devel/ directory. 

The sockets package is not on CRAN, since it will reasonably soon be
part of the R distribution (certainly R0.64, possibly a R0.63.x). It is



  Jeff Banfield of my department has build a front-end for R which gives
output to a browser.  I believe he uses Perl and we do run it on Solaris.



I'm also very much interested in linking VB to R, perhaps also running R on
a different computer on the network (like for example MathSoft's
Unfortunately, my current high-priority software development projects make
that this can not be a short-term occupation, but rather a medium-to-long
term project. However, I would be glad to hear from you about the progress
you were able to make in your project, although I can't offer any help, at
least for the time being.

Thank you very much in advance,


Zivan Karaman
Limagrain Genetics Research, B.P. 115, 63203 Riom Cedex, France
Tel: +33 (0) 473 634 343     Fax: +33 (0) 473 634 345
E-mail: zivan.karaman at biocem.univ-bpclermont.fr

> -----Original Message-----
> From:	Guido Masarotto 
> Sent:	Friday, January 29, 1999 3:12 PM
> To:	rsy at transmedia.de
> Cc:	r-help at stat.math.ethz.ch
> Subject:	Re: [R] R - API ?
> On Fri, Jan 29, 1999 at 02:12:45PM +0000, Reinhard Sy wrote:
> > HI,
> > 
> > 	I would like to use R in my own main-Program. Is this possible ? If
> yes
> > where I can find an documentation about this feature ?
> > All my question belongs to R running under Windows.
>   It is possible but all the alternatives that come to my mind require
>   some work since 'as shipped' R is not designed as an 'embedable'
>   language. 
>   Basically, you need to:
>   1) initialize appropriately the interpreter (you have to 'stole'
>      code from the Windows specific sources (in particular from
>      src/gnuwin32/system.c and src/gnuwin32/front-end/Rterm.c in
>      rw0632s.zip) and from the main distribution (in particular
>      you need, I suppose, all the code of function mainloop in
>      src/main/main.c excluding the end which enter in the 
>      read-and-eval loop). Your program can then 'talk'
>      with the interpreter via the parse/eval function. Example
>      is the read-eval-loop in src/main/main.c. 
>   2) link your program against R.dll (how depend from the compiler).
>   I am not sure that there is any documentation but the source.
>   Perhaps, some other can be more helpful than me.
>   Remark1: Thomas Lumley has some 'sockets' library for R which
>   should let something of this sort. However, I have not
>   looked to it and I don't know if it is portable to Windows.
>   Remark2: I don't rebember who (I apologize 'a priori' for
>   this) have prepared a R-perl interface which I think can be
>   taken as a model. It is included in the GNU/Debian Linux
>   distribution so you can find it at http://www.debian.org.
>   Again, I don't know if it can be easily ported to Windows.
> > 
> > If I cannot call an R-API Function from my C-Program is it possible to
> > run R in batch-mode like Splus ?
>   That is easy. Starting from version 0.63.1, there are two executable
>   under Windows (at least in the rwxxxx port). One Rgui.exe is  for 
>   interactive use, the other Rterm.exe is for batch-mode operation;
> basically
>      Rterm < input.file. R > output.file
>   guido
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> -.-.-
> 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 mailing list