Thuan-Jin Kee
2004-Nov-24 06:09 UTC
[R] R 2.0.1 jpeg() png() pdf() Mac OSX 10.3.5 - empty files being created
Hi everyone, I've been opening up R 2.0.1 from the dock and then starting the Mac OSX X11 server. After that I call>jpeg("test.jpg",plot(rnorm(10)))and r pops up a quartz window with the appropriate graph in it and puts a file called test.jpg into the HOME which is 0kb in size and is completely empty. There is no error message. I've tried>png("test.png", plot(rnorm(10)))and>pdf(plot(rnorm(10)))with the same result. I'm sure that I've got the appropriate libpng and jpeg libraries installed correctly from sourceforge as linked to by http://www.economia.unimi.it/R/ Thanks in advance Yours Jin Kee
Prof Brian Ripley
2004-Nov-24 06:58 UTC
[R] R 2.0.1 jpeg() png() pdf() Mac OSX 10.3.5 - empty files being created
On Wed, 24 Nov 2004, Thuan-Jin Kee wrote:> I've been opening up R 2.0.1 from the dock and then starting the Mac OSX > X11 server. > > After that I call > >> jpeg("test.jpg",plot(rnorm(10)))Please do read the help page: the syntax is jpeg("test.jpg") plot(rnorm(10)) dev.off()> and r pops up a quartz window with the appropriate graph in it and puts a > file called test.jpg into the HOME which is 0kb in size and is completely > empty. > > There is no error message. > > I've tried >> png("test.png", plot(rnorm(10))) > > and >> pdf(plot(rnorm(10))) > > with the same result.Also not as specified on their help pages. You never plotted anything on the devices you opened, and you did not close them. -- 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