Method 3:
 > pdf(file="my_plot.pdf", paper="a4")
 > dev.off()

The `pdf` function opens a *new* graphics device, you then send output to the device before calling dev.off(), e.g.,

pdf(file = my_plot.pdf")
plot(1:10, 1:10)
dev.off()



-yields a .pdf file of 1kb (same plot example) and returns the following error when attempting to open with Adobe acrobat:

"There was an error opening this document. This file cannot be opened because it has no pages."

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to