add_plot {rrtable}R 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)")

[Package rrtable version 0.3.0 Index]