auto_style_indent: Consolidate the header columns into one, taking the rightmost...

Description Usage Arguments Examples

Description

e.g. a | b | (all) -> b e.g. (all) | (all) | (all) -> Grand Total

Usage

1
2
auto_style_indent(tab, keyword = "(all)", total_text = NULL,
  left_header_colname = " ")

Arguments

tab

a tab object

keyword

The keyword to use to detect summarisation. Uses '(all)' by default because this is what reshape2::dcast uses

total_text

The text to use for the grand total (a row where all the left headers are '(all)'. Defaults to Grand Total.

left_header_colname

The column name of left header column, which is now a single column.

Examples

1
2
3
4
crosstab <- read.csv(system.file("extdata", "example_crosstab.csv", package="xltabr"))
tab <- initialise()
tab <- add_body(tab, crosstab, left_header_colnames = c("drive", "age"))
tab <- auto_style_indent(tab)

moj-analytical-services/xltabr documentation built on May 9, 2019, 9:59 p.m.