This function adds a facade to a tsg table object. A facade is a set of styling options that can be applied to the table to customize its appearance. For Excel output, see openxlsx::createStyle() for all valid values.
add_facade(
data,
table.offsetRow = 0,
table.offsetCol = 0,
table.gridLines = NULL,
table.tabColour = NULL,
table.fontName = NULL,
table.fontSize = NULL,
table.fontColour = NULL,
table.bgFill = NULL,
table.fgFill = NULL,
table.halign = NULL,
table.valign = NULL,
table.wrapText = FALSE,
table.indent = NULL,
table.locked = NULL,
table.hidden = NULL,
table.decimalPrecision = NULL,
table.decimalCols = NULL,
table.lastRowBold = NULL,
table.width = NULL,
table.widthOffset = NULL,
title.fontName = NULL,
title.fontSize = NULL,
title.fontColour = NULL,
title.border = NULL,
title.borderColour = NULL,
title.borderStyle = NULL,
title.bgFill = NULL,
title.fgFill = NULL,
title.halign = NULL,
title.valign = NULL,
title.textDecoration = NULL,
title.wrapText = NULL,
title.indent = NULL,
title.height = NULL,
subtitle.fontName = NULL,
subtitle.fontSize = NULL,
subtitle.fontColour = NULL,
subtitle.border = NULL,
subtitle.borderColour = NULL,
subtitle.borderStyle = NULL,
subtitle.bgFill = NULL,
subtitle.fgFill = NULL,
subtitle.halign = NULL,
subtitle.valign = NULL,
subtitle.textDecoration = NULL,
subtitle.wrapText = NULL,
subtitle.indent = NULL,
subtitle.height = NULL,
header.fontName = NULL,
header.fontSize = NULL,
header.fontColour = NULL,
header.border = NULL,
header.borderColour = NULL,
header.borderStyle = NULL,
header.bgFill = NULL,
header.fgFill = NULL,
header.halign = NULL,
header.valign = NULL,
header.textDecoration = NULL,
header.wrapText = NULL,
header.indent = NULL,
header.height = NULL,
spanner.fontName = NULL,
spanner.fontSize = NULL,
spanner.fontColour = NULL,
spanner.border = NULL,
spanner.borderColour = NULL,
spanner.borderStyle = NULL,
spanner.bgFill = NULL,
spanner.fgFill = NULL,
spanner.halign = NULL,
spanner.valign = NULL,
spanner.textDecoration = NULL,
spanner.wrapText = NULL,
spanner.indent = NULL,
spanner.height = NULL,
body.fontName = NULL,
body.fontSize = NULL,
body.fontColour = NULL,
body.numFmt = NULL,
body.border = NULL,
body.borderColour = NULL,
body.borderStyle = NULL,
body.bgFill = NULL,
body.fgFill = NULL,
body.halign = NULL,
body.valign = NULL,
body.textDecoration = NULL,
body.wrapText = NULL,
body.indent = NULL,
body.height = NULL,
col_first.fontName = NULL,
col_first.fontSize = NULL,
col_first.fontColour = NULL,
col_first.numFmt = NULL,
col_first.border = NULL,
col_first.borderColour = NULL,
col_first.borderStyle = NULL,
col_first.bgFill = NULL,
col_first.fgFill = NULL,
col_first.halign = NULL,
col_first.valign = NULL,
col_first.textDecoration = NULL,
col_first.wrapText = NULL,
col_first.indent = NULL,
col_first.width = NULL,
col_last.fontName = NULL,
col_last.fontSize = NULL,
col_last.fontColour = NULL,
col_last.numFmt = NULL,
col_last.border = NULL,
col_last.borderColour = NULL,
col_last.borderStyle = NULL,
col_last.bgFill = NULL,
col_last.fgFill = NULL,
col_last.halign = NULL,
col_last.valign = NULL,
col_last.textDecoration = NULL,
col_last.wrapText = NULL,
col_last.indent = NULL,
col_last.width = NULL,
row_group.fontName = NULL,
row_group.fontSize = NULL,
row_group.fontColour = NULL,
row_group.border = NULL,
row_group.borderColour = NULL,
row_group.borderStyle = NULL,
row_group.bgFill = NULL,
row_group.fgFill = NULL,
row_group.halign = NULL,
row_group.valign = NULL,
row_group.textDecoration = NULL,
row_group.wrapText = NULL,
row_group.indent = NULL,
row_group.width = NULL,
row_group.height = NULL,
source_note.fontName = NULL,
source_note.fontSize = NULL,
source_note.fontColour = NULL,
source_note.border = NULL,
source_note.borderColour = NULL,
source_note.borderStyle = NULL,
source_note.bgFill = NULL,
source_note.fgFill = NULL,
source_note.halign = NULL,
source_note.valign = NULL,
source_note.textDecoration = NULL,
source_note.wrapText = NULL,
source_note.indent = NULL,
source_note.height = NULL,
footnotes.fontName = NULL,
footnotes.fontSize = NULL,
footnotes.fontColour = NULL,
footnotes.border = NULL,
footnotes.borderColour = NULL,
footnotes.borderStyle = NULL,
footnotes.bgFill = NULL,
footnotes.fgFill = NULL,
footnotes.halign = NULL,
footnotes.valign = NULL,
footnotes.textDecoration = NULL,
footnotes.wrapText = NULL,
footnotes.indent = NULL,
footnotes.height = NULL,
border_header.border = NULL,
border_header.borderColour = NULL,
border_header.borderStyle = NULL,
border_outer.borderColour = NULL,
border_bottom.height = NULL
)A tsg object with the specified facade settings applied as attributes.
A tsg table object to which the facade will be added. This is typically a data frame or tibble that has been processed using tsg functions.
Row offset of the table
Column offset of the table
Boolean indicating whether to show grid lines in the table
Color of the table tab (Excel worksheet) in the output file. Can be a hexadecimal color code (e.g., "#FF0000" for red) or a named color (e.g., "red").
Font name or font family for the table, title, subtitle, header, spanner, body, row group header, source note, and footnotes respectively.
Font size for the table, title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively.
Font color for the table, title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. Can be a hexadecimal color code (e.g., "#FF0000" for red) or a named color (e.g., "red").
Background fill color for the table, title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. Can be a hexadecimal color code (e.g., "#FF0000" for red) or a named color (e.g., "red").
Foreground fill color for the table, title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. Can be a hexadecimal color code (e.g., "#FF0000" for red) or a named color (e.g., "red").
Horizontal alignment for the table, title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. Can be "left", "center", or "right".
Vertical alignment for the table, title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. Can be "top", "middle", or "bottom".
Logical indicating whether to wrap text in the table, title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively.
Indentation for the table, title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. Can be a numeric value indicating the number of spaces to indent. Defaults to NULL.
Logical indicating whether the table is locked.
Logical indicating whether the table (Excel worksheet) is hidden.
Numeric value indicating the number of decimal places to display in numeric columns.
Character vector of column names that should have decimal formatting applied.
Logical indicating whether the last row of the table should be bold.
Column widths for the table, first column, last column, and row group header respectively. Can be a numeric value indicating the width in points.
Numeric value indicating the width offset for the table.
Border style for the title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. Can be a string representing the border style. The border_header.border is used for the header border style.
Border color for the title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. Can be a hexadecimal color code (e.g., "#FF0000" for red) or a named color (e.g., "red"). The border_header.borderColour and border_outer.borderColour are used for the header and outer borders of the table.
Border style for the title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively. The border_header.borderStyle is used for the header border style.
Text decoration for the title, subtitle, header, spanner, body, first column, last column, row group header, source note, and footnotes respectively.
Height for the title, subtitle, header, spanner, body, row group, source note, footnotes, and bottom border of the table respectively. Can be a numeric value indicating the height in points.
Numeric format for the body, first column, and last column respectively. Can be a string representing the numeric format.
person_record |>
generate_frequency(sex) |>
add_facade(table.offsetRow = 2, table.offsetCol = 1)
Run the code above in your browser using DataLab