add_plot: Add plot into a document object

Description Usage Arguments Value Examples

View source: R/add_plot.R

Description

Add plot into a document object

Usage

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

Arguments

mydoc

A document object

plotstring

String of an R code encoding a plot

preprocessing

preprocessing

width

width of plot

height

height of plot

top

top position of plot

Value

a document object

Examples

1
2
3
4
5
6
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 2, 2020, 5:09 p.m.