I have set up an R procedure that is launched every three hours by crontab in a unix server. Crontab runs at regular intervals the following line: R CMD BATH myprog.R myprog.R (which by the way uses R2HTML) should create an updated png graph to be referred to and seen in an intranet web-page index.html. The problem is that both: png (....) plot(...) dev.off() AND: plot(...) HTMLplot(...) fail when launched in a batch manner compalining that they need an X11() instance to be used (I understand that they work only in a graphic context and intarictively). How can I obtain that png file? Ciao Vittorio
On Fri, 2006-06-23 at 17:23 +0100, Vittorio wrote:> I have set up an R procedure that is launched every three hours by > crontab in a unix server. Crontab runs at regular intervals the > following line: > R CMD BATH myprog.R > > myprog.R (which by the way uses > R2HTML) should create an updated png graph to be referred to and seen > in an intranet web-page index.html. > > The problem is that both: > > png > (....) > plot(...) > dev.off() > > AND: > > plot(...) > HTMLplot(...) > > fail when > launched in a batch manner compalining that they need an X11() instance > to be used (I understand that they work only in a graphic context and > intarictively). > > How can I obtain that png file?See R FAQ 7.19 How do I produce PNG graphics in batch mode? HTH, Marc Schwartz
?png explains this to you and gives alternatives. On Fri, 23 Jun 2006, Vittorio wrote:> I have set up an R procedure that is launched every three hours by > crontab in a unix server. Crontab runs at regular intervals the > following line: > R CMD BATH myprog.RBATCH?> myprog.R (which by the way uses > R2HTML) should create an updated png graph to be referred to and seen > in an intranet web-page index.html. > > The problem is that both: > > png > (....) > plot(...) > dev.off() > > AND: > > plot(...) > HTMLplot(...) > > fail when > launched in a batch manner compalining that they need an X11() instance > to be used (I understand that they work only in a graphic context and > intarictively). > > How can I obtain that png file? > > Ciao > Vittorio > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >-- 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 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595