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

View source: R/flextable-getListing.R

mergeHeaderColsR Documentation

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)

Arguments

x

a flextable object

mapping

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

Value

Updated flextable object with merged cells in the header.


inTextSummaryTable documentation built on Sept. 12, 2023, 5:06 p.m.