[R] Graphs

Prof Brian D Ripley ripley at stats.ox.ac.uk
Fri Apr 30 10:28:17 CEST 1999

On Fri, 30 Apr 1999, Geldenhuys, Willie wrote:

> I am trying to use the Windows version of R to do the following:
> -	Have a Delphi front-end which gets the user input
> -	Delphi will produce a R script, do a system call to R to 	
> 	calculate the statistics.
> 	Is there a better way? Maybe a library one can use in Delphi or 
> 	Visual C?

Not yet! If you look back in the recent R-help archives you will see
a report on future plans for R for Windows.

> -	How do one see a graph? A graph is plotted in a window which 
> 	IMMEDIATELY closes afterwords so that one can't see 
> 	anything. How can one get the graph to show until user 
> 	presses a key.

You did something to make the window close, for example had EOF in the
script. If my guess is right, don't do that. Two ideas:

(1) call locator(1) at the point you want a wait. Then the user has to
click on the graph to continue.

(2) run R at the end of a pipe. Then you can send EOF when you are done
with R, or dev.off() when you are done with the graphics window. I have
no idea if Delphi supports pipes correctly. The --ess flag in R is
designed to simplify its use at the end of a pipe from NTemacs.

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