createFlextableWithHeader: Create a flextable, setting the column names to syntactic...

View source: R/flextable-getListing.R

createFlextableWithHeaderR Documentation

Create a flextable, setting the column names to syntactic names if it is not the case.

Description

Create a flextable, setting the column names to syntactic names if it is not the case.

Usage

createFlextableWithHeader(
  data,
  headerDf = NULL,
  title = NULL,
  includeRownames = TRUE,
  colHeaderMerge = TRUE
)

Arguments

data

Data.frame with data.

headerDf

(optional) Data.frame with header. This should contain the same number of columns than data (+ if includeRownames is TRUE) and optionally multiple rows. Neighbouring cells with same content will be represented merged in the output.

title

Character vector with title(s) for the table. Set to NULL (by default) if no title should be included.

includeRownames

Logical, if TRUE (by default) rownames are included in the flextable object.

colHeaderMerge

(flextable output) Logical, if TRUE (FALSE by default) the column header is merged.

Value

list with:

  • 'ft': flextable

  • 'colsData': Named vector with original column names, with names set to new syntactic names.

Author(s)

Laure Cougnaud


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