Add plot into layout placeholder

phl_with_plot(x, olay, id, plotFnc, res = 300, ...)

Arguments

x

rpptx object

olay

an OfficerLayout object created using phl_layout

id

an single integer with an id of the placeholder from olay object.

plotFnc

a function which creates a plot when called.

res

The nominal resolution in ppi which will be recorded in the bitmap file. Default 300. See res parameter in png.

...

other arguments passed to png function.

Value

rpptx object which represents PowerPoint presentation in officer. The returned object contains a new element on the slide.