When I use pdf(\"somefile.pdf\") to save my plots to a pdf file, everything seems to work. No error messages or whatsoever. Still the result is screwed (file size i
pdf(\"somefile.pdf\")
Did you remember to close the file via dev.off() before trying to view it?
dev.off()
(See also: problem saving pdf file in R with ggplot2 )