[R] Interactive R, with wrapper

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon May 13 13:45:13 CEST 2002


On Mon, 13 May 2002, PAULO VILA SANCHEZ wrote:

> Hello team of R, We have a question about the interactivity of R in Windows,
>
> We are implementing a wrapper in C# for displaying graphics generated by R
> functions.
> The application in C# communicates with R by standard input and standard
> output. (when it is written "interactive()", the response is "FALSE")

This is with rterm.exe, I presume?

> The problem we have is when writing  in the standard input "x11()"
> It displays a window, but it can not be moved after focusing in the c# app.
> The R window ( from command "x11()" ) is able to plot , but , the menu
> disappears , and int cannot refresh.

This is standard behaviour: C programs block on stdin, so the R eventloop
cannot run.

>  Is it possible to know what is going on , and how we can resolve this
> problem ?

Yes, it is possible, for R is Open Source and there are no secrets.
Users are expected to help themselves, though.  The usual way is to

1) read the documentation (you might find out the correct name of the
standard graphics device that way), and if that fails

2) read the code (src/gnuwin32/system.c in this case).

Have you looked at README.rterm, for example?  (Hint: the answer is in
that README.)

> Is there a posibility to work through R's standard input and output , and keep
> windows interaction ?

Yes.  However, I do suggest you use the DCOM interface, which is designed
for the job you are attempting.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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