R: add flextable into a Word document

body_add_flextable {flextable} | R Documentation

## add flextable into a Word document

### Description

add a flextable into a Word document.

### Usage

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

### Arguments

`x` | an rdocx object
`value` | `flextable` object
`align` | left, center (default) or right.
`pos` | where to add the flextable relative to the cursor, one of "after", "before", "on" (end of line).

### Examples

    library(officer)
    ft <- flextable(head(mtcars))
    ft <- theme_zebra(ft)
    ft <- autofit(ft)
    doc <- read_docx()
    doc <- body_add_flextable(doc, value = ft)
    print(doc, target = "test.docx")

[Package flextable version 0.4.5 Index]