block_table: Table block

View source: R/ooxml_block_objects.R

block_tableR Documentation

Table block

Description

Create a representation of a table

Usage

block_table(x, header = TRUE, properties = prop_table(), alignment = NULL)

Arguments

x

a data.frame to add as a table

header

display header if TRUE

properties

table properties, see prop_table(). Table properties are not handled identically between Word and PowerPoint output format. They are fully supported with Word but for PowerPoint (which does not handle as many things as Word for tables), only conditional formatting properties are supported.

alignment

alignment for each columns, 'l' for left, 'r' for right and 'c' for center. Default to NULL.

See Also

prop_table()

Other block functions for reporting: block_caption(), block_list(), block_pour_docx(), block_section(), block_toc(), fpar(), plot_instr(), unordered_list()

Examples

block_table(x = head(iris))

block_table(x = mtcars, header = TRUE,
  properties = prop_table(
    tcf = table_conditional_formatting(
      first_row = TRUE, first_column = TRUE)
  ))

officer documentation built on Oct. 10, 2024, 1:06 a.m.