rvg (version 0.2.2)

ph_with_vg: add a plot output as vector graphics into a PowerPoint object

Description

produces a vector graphics output from R plot instructions and add the result in a PowerPoint document object produced by read_pptx.

These functions will be deprecated and function ph_with.dml should be used instead.

Usage

ph_with_vg(x, code, ggobj = NULL, type = "body", index = 1, ...)

ph_with_vg_at(x, code, ggobj = NULL, left, top, width, height, ...)

Arguments

x

an rpptx object produced by officer::read_pptx

code

plot instructions

ggobj

ggplot objet to print. argument code will be ignored if this argument is supplied.

type

placeholder type

index

placeholder index (integer). This is to be used when a placeholder type is not unique in the current slide, e.g. two placeholders with type 'body'.

...

arguments passed on to dml_pptx.

left, top

left and top origin of the plot on the slide in inches.

height, width

Height and width in inches.