Plot to the pdf and png devices at once.
pdfpng(expr, fn)
Produces the files fn.pdf and fn.png.
fn.pdf
fn.png
p <- quote({ plot(1:10) points(10:1) }) pdfpng(p, "myfig")#> pdf #> 2