Learn R Programming

flextable (version 0.3.0)

body_add_flextable: wml table code

Description

produces the wml of a flextable

Usage

body_add_flextable(x, value, align = "center", pos = "after")

Arguments

x

a docx object

value

flextable object

align

left (default), center or right.

pos

where to add the flextable relative to the cursor, one of "after", "before", "on" (end of line).

Examples

Run this code
# NOT RUN {
library(officer)
ft <- flextable(head(mtcars))
ft <- theme_zebra(ft)
# }
# NOT RUN {
ft <- autofit(ft)
# }
# NOT RUN {
doc <- read_docx()
doc <- body_add_flextable(doc, value = ft)
# }
# NOT RUN {
print(doc, target = "test.docx")
# }

Run the code above in your browser using DataLab