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

View source: R/add_flextable.R

add_flextableR Documentation

Add a flextable or mytable object into a document object

Description

Add a flextable or mytable object into a document object

Usage

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

## Not run: 
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)

## End(Not run)

cardiomoon/rrtable documentation built on March 14, 2023, 10:39 p.m.