[R] Re: R-0.65.1 for WinNT/9XRe: R-0.65.1 for WinNT/9X
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Sat Oct 9 17:36:22 CEST 1999
"Hisaji ONO" <ono96 at fa2.so-net.ne.jp> writes:
> >There is more support for (support of) ActiveX Automation via the
> >Rproxy.dll: see the file front-ends/readme.
>
> And where is this "the file front-ends/readme" which describes R's ActiveX
> Automation ?
>
> In "readme" under "r-install path\" and FAQ for Win port, no description
> about this.
>
> Please teach me.
In the main sources, under src/gnuwin32/front-ends
Here it is for easy reference, but as you see it's intended for
programmers, so you'll need the sources eventually:
--- front-ends/readme ---
Linking the R DLL into other applications
=========================================
The file rtest.c provides an example of linking the R engine into
another front end. To build it
- edit it to set Rp->rhome and Rp->home appropriately, or set
appropriate environmental variables.
- to make with gcc, make -f make.rtest
- to make with VC++,
copy ..\R.exp and ..\R.dll to this directory
lib /def:R.exp /machine:ix86 /out:Rdll.lib
cl /MT /Ox /I..\..\include /I.. rtest.c Rdll.lib
This provides an rterm-like test front end. The main loop is in the
main program here: R_ReplDLLdo1() parses one line (up to ; or \n) and
returns 1 if complete, 2 if incomplete as an R expression.
There is a callback available during evaluation, plotting and console
I/O, intended to be used for processing GUI events. (The pager and
graphics windows' GUI events are handled at these times by
ProcessEvents: the callback is called from within ProcessEvents.)
Note that in this version console input blocks the process so pager
and graphics windows will not respond during input: a real application
that uses these windows needs to have a non-blocking ReadConsole
function. Rterm uses a separate thread to achieve this.
An alternative to linking the import library would be to explicitly
load the DLL from a known location or after searching for it.
The example shows one way to handle user interrupts, although it might
be as easy to generate a SIGINT directly from a GUI front end. For
this to be useful you will want to set R_Interactive to be true, and
you will need to use SETJMP to jump back to somewhere useful in your
code.
A R proxy DLL
=============
Files bdx* and rproxy* are used to build a proxy DLL (by Thomas Baier)
for
use with his automation server StatConnectorSrv.exe. The file rprx.c
is a
simple test main program for rproxy.dll.
The interface can evaluate commands and transfer simple R objects
(e.g.
vectors and matrices).
Look on CRAN under `platform-specific extension packages' for the
automation server.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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