Learn R Programming

flextable (version 0.5.8)

docx_value: flextable Office Open XML string for Word

Description

get openxml raw code for Word from a flextable object.

The function is particularly useful when you want to generate flextable in a loop from a R Markdown document. By default, the output is printed and is returned as a character scalar.

When used inside an R Markdown document, chunk option results must be set to 'asis'.

Arguments ft.align, ft.split and tab.cap.style can be specified also as knitr chunk options.

Usage

docx_value(
  x,
  print = TRUE,
  ft.align = opts_current$get("ft.align"),
  ft.split = opts_current$get("ft.split"),
  tab.cap.style = opts_current$get("tab.cap.style")
)

Arguments

x

a flextable object

print

print output if TRUE

ft.align

flextable alignment, supported values are 'left', 'center' and 'right'.

ft.split

Word option 'Allow row to break across pages' can be activated when TRUE.

tab.cap.style

specifies a Word style for table caption, default value is "Table Caption".

See Also

Other flextable print function: as_raster(), htmltools_value(), knit_print.flextable(), plot.flextable(), print.flextable(), save_as_docx(), save_as_html(), save_as_image(), save_as_pptx()

Examples

Run this code
# NOT RUN {
docx_value(flextable(iris[1:5,]))
# }

Run the code above in your browser using DataLab