[R] R 2.0.1 jpeg() png() pdf() Mac OSX 10.3.5 - empty files	being  created
    Prof Brian Ripley 
    ripley at stats.ox.ac.uk
       
    Wed Nov 24 07:58:26 CET 2004
    
    
  
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
    
    
More information about the R-help
mailing list