| dml {rvg} | R Documentation |
A simple wrapper to mark
the plot instructions as Vector Graphics instructions. It produces
an object of class 'dml' with a corresponding method ph_with.
The function enable usage of any R plot with argument code and with
ggplot objects with argument ggobj.
dml( code, ggobj = NULL, bg = "white", fonts = list(), pointsize = 12, editable = TRUE, ... )
code |
plotting instructions |
ggobj |
ggplot object to print. argument code will be ignored if this argument is supplied. |
bg, fonts, pointsize, editable |
Parameters passed to |
... |
unused arguments |
anyplot = dml(code = barplot(1:5, col = 2:6), bg = "wheat") library(officer) doc <- read_pptx() doc <- add_slide(doc, "Title and Content", "Office Theme") doc <- ph_with(doc, anyplot, location = ph_location_fullsize()) fileout <- tempfile(fileext = ".pptx") # fileout <- "vg.pptx" print(doc, target = fileout)