[R] using jpeg() in BATCH mode
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Wed Aug 15 00:08:41 CEST 2001
Evan Zane Macosko <macosko at fas.harvard.edu> writes:
> So I tried using the dev2bitmap function, and I get an empty file. Here
> is my batch script(simplified):
>
> angles<-scan("tempout.txt");
> hist(angles);
> filename<-c("/var/www/html/histograph.png");
> dev2bitmap(filename, type = "png256", height = 4, width = 4, res = 65,
> pointsize = 10);
>
>
> Any suggestions on why this doesn't work?
You didn't read what Brian wrote:
> > Under Unix, to use jpeg() you need to start R with the X11 gui, and BATCH
> > does not. bitmap() works though ...
^^^^^^^^
There's no "dev to bitmap" when you get there, try
angles<-scan("tempout.txt")
filename<-c("/var/www/html/histograph.png")
bitmap(filename, type = "png256", height = 4, width = 4, res = 65,
pointsize = 10)
hist(angles)
dev.off()
BTW: This is R, not Perl or SAS. You don't need semicolon at end of
lines.
--
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
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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