Save a ggplot figure in PDF and/or PNG formats
save_pppower_figure.RdFollows figures4papers conventions: vector PDF with TrueType font embedding and optional raster PNG at 400 DPI. White background, tight crop.
Usage
save_pppower_figure(
plot,
path,
width = 10,
height = 5,
dpi = 400,
formats = c("pdf", "png")
)