Learn R Programming

inTextSummaryTable (version 3.3.2)

mergeHeaderCols: Merge columns and rows in the header of a flextable object.

Description

This:

  • (1) for each row: checks that subsequent columns are identical (and corresponding sub-header overlap), so should be merged

  • (2) for each column: checks that subsequent rows are identical, so should be merged

  • filters cells planned to be merged across rows (2) if they are already merged across columns (1)

Usage

mergeHeaderCols(x, mapping)

Value

Updated flextable object with merged cells in the header.

Arguments

x

a flextable object

mapping

a data.frame specyfing for each colname content of the column.