[R] Non-interactive sessions

Neil E. Klepeis
Fri, 17 Sep 1999 23:07:30 -0000

Greetings,

Quick Summary:   How does R function non-interactively?  I can't print
graphics to an X11 window.

I set up what appears to be called a "noninteractive" R session using
the Perl code at the end of this message.  Everthing seems to work fine
as written.  I get a nice postscript file with my graphics.

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.

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?


Regards,
Neil


Appendix: My Perl Code
------------------------------------------
use FileHandle;
$R = new FileHandle ("| R --no-save");
$R->print("postscript(\"myfile.ps\")\n");
$R->print("dev.print(postscript)\n");
$R->print("curve(sin(x),-pi,pi)\n");
$R->print("dev.off()\n");
-------------------------------------------

--
___________________________________________________________
Neil E. Klepeis, School of Public Health, UC Berkeley, USA
Web: http://socrates.berkeley.edu/~nklepeis
Email: nklepeis at uclink4.berkeley.edu
Voice: 510-848-5827
-------------------