Displaying 2 results from an estimated 2 matches for "plotscript".
Did you mean:
plot2script
2004 Dec 03
1
Getting R to emit an image file as a pipe or Base64 strea m: Mac OSX 10.3 - R 2.0.1
> From: Yuandan Zhang
>
> If you want to call R from perl, why don't you do a simple
> system call like:
>
> $callR="/usr/loca/bin/R CMD BATCH plotscript.R";
> system ($callR);
>
> It is not necessary to start X display if anything can be
> done in background
But the problem is jpeg()/png() are not available unless an X display is
available to the R process (one of the FAQs).
Andy
> On Fri, 3 Dec 2004 12:07:24 +1100 (EST...
2004 Dec 03
1
Getting R to emit an image file as a pipe or Base64 stream: Mac OSX 10.3 - R 2.0.1
..., $callRold);
# need to start X if is isn't already started.
`open /Applications/Utilities/X11.app`;
#need to get let the R program know where to look
#for the display immediately before calling
#the R executible.
$callR =<<MARKER;
DISPLAY=:0.0; export DISPLAY;
/usr/bin/R --vanilla <plotscript.R;
MARKER
system($callR);
# end script
#!/usr/bin/R
peg("~/Desktop/test.jpg");
plot(rnorm(100));
dev.off();
q(save = "no");
My sysadmin says that the apache user can't write to the disk due to
security policy, so he wants to know if I can emit the jpeg as a base64
strea...