Make pdf file with a plot code
plotPDF2(fun, file, width = 7, height = 5, units = "in", res = 300,
ggplot = FALSE)
A R code for plot
A path of destination file
A plot width
A plot height
The units in which height and width are given. Can be px (pixels, the default), in (inches), cm or mm.
The nominal resolution in ppi
A logical. Set this argument true if the R code is for ggplot