[R] problem with pdf() R 2.2.1, os 10.4.6
Marc Schwartz
MSchwartz at mn.rr.com
Sat May 20 01:43:23 CEST 2006
On Fri, 2006-05-19 at 16:36 -0700, Betty Gilbert wrote:
> Hi,
> I'm trying to write a histogram to a pdf
>
> pdf()
> plot<-hist(c, xlim=c( 0.69, 0.84), ylim=c(0,100))
>
> when I try to open the pdf I can't open it, there is always some
> error . Is there something I should add to make it run under this
> operation system? I had problems upgrading to 2.3 (problem
> downloading packages) so I'm not sure an upgrade will work out with
> me. I just want a publication quality histogram...
>
> thank you,
> betty
Betty,
You need to explicitly close the pdf device with:
dev.off()
once the plotting related code has completed. See the example in ?pdf
for more information.
Otherwise, the result of hist() is not flushed to the disk file and the
file then properly closed.
HTH,
Marc Schwartz
More information about the R-help
mailing list