add_flextable: Add a flextable or mytable object into a document object

Description Usage Arguments Value Examples

View source: R/add_flextable.R

Description

Add a flextable or mytable object into a document object

Usage

1
add_flextable(mydoc, ftable, echo = FALSE, code = "", landscape = FALSE)

Arguments

mydoc

A document object

ftable

A flextable or mytable object

echo

whether or not display R code

code

R code string

landscape

Logical. Whether or not make a landscape section.

Value

a document object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
require(rrtable)
require(moonBook)
require(officer)
require(magrittr)
ftable=mytable(Dx~.,data=acs)
title="mytable Example"
ft=df2flextable(head(iris))
title2="df2flextable Example"
doc=read_docx()
doc %>% add_text(title=title) %>%
        add_flextable(ftable) %>%
        add_text(title=title2) %>%
        add_flextable(ft)

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