add_plot: Add plot into a document object

View source: R/add_plot.R

add_plotR Documentation

Add plot into a document object

Description

Add plot into a document object

Usage

add_plot(mydoc, plotstring, width = 6, height = 6, top = 2)

Arguments

mydoc

A document object

plotstring

String of an R code encoding a plot

width

width of plot

height

height of plot

top

top position of plot

Value

a document object

Examples

require(rrtable)
require(officer)
require(rvg)
require(magrittr)
read_pptx() %>% add_text(title="Plot") %>% add_plot("plot(iris)")
read_docx() %>% add_text(title="Plot") %>% add_plot("plot(iris)")

rrtable documentation built on April 5, 2022, 9:08 a.m.