[R] Non-interactive sessions

Peter Dalgaard BSA
Fri, 17 Sep 1999 23:33:08 -0000

"Neil E. Klepeis" <nklepeis at uclink4.berkeley.edu> writes:

> However, I would like to display X11 R-graphics for the Perl-script
> user.  Is there some way of sending commands to R to configure this
> "noninterative mode"?  Especially so that I can produce X11
graphics.

Like this?

use FileHandle;
$R = new FileHandle ("| R --no-save");
$R->print("X11()\n");
$R->print("curve(sin(x),-pi,pi)\n");
$R->print("locator()\n");

You need some kind of interactivity to keep R from taking the window
down immediately.


> Another related issue:  When I first sent the pipe to R (with no
> options) it didn't work and I got the following error message:
>
> " Fatal error : you must specify '--save',
'--no-save', or '--vanilla' "
>
> What is the '--vanilla' option all about?

'R --help' will tell you.

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