add_2flextables: Add two flextables into a document object

Description Usage Arguments Value Examples

View source: R/add_2ggplots.R

Description

Add two flextables into a document object

Usage

1
add_2flextables(mydoc, ft1, ft2, echo = FALSE, width = 3, code = "")

Arguments

mydoc

A document object

ft1

The first flextable

ft2

The second flextable

echo

whether or not display R code

width

plot width in inches

code

R code string

Value

a document object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
require(rrtable)
require(officer)
require(magrittr)
title="Two Tables"
ft1=df2flextable(head(iris[1:4]))
ft2=df2flextable(tail(iris[1:4]))
doc=read_docx()
doc %>% add_text(title=title) %>%
        add_2flextables(ft1,ft2)
doc=read_pptx()
doc %>% add_text(title=title) %>%
        add_2flextables(ft1,ft2)

rrtable documentation built on April 2, 2020, 5:09 p.m.