Add a row of new columns labels in footer part.
Labels can be spanned along multiple columns, as merged cells.
Labels are associated with a number of columns
to merge that default to one if not specified.
In this case, you have to make sure that the
number of labels is equal to the number of columns displayed.
The function can add only one single row by call.
Usage
add_footer_row(x, top = TRUE, values = character(0), colwidths = integer(0))
Arguments
x
a flextable object
top
should the row be inserted at the top or the bottom.
values
values to add. It can be a list or a character() vector.
If it is a list, it must be a named list using the names of the columns of the
original data.frame or the colkeys; this is the recommended method because
it allows to keep the original data types and therefore allows to perform
conditional formatting. If a character, columns of the original data.frame
stored in the flextable object are changed to character(); this is often
not an issue with footer and header but can be inconvenient if adding
rows into body as it will change data types to character and prevent
efficient conditional formatting.
colwidths
the number of columns to merge in the row for each label
Illustrations
See Also
Other functions that add lines in the table:
add_body_row(),
add_body(),
add_footer_lines(),
add_footer(),
add_header_row(),
add_header()
Other functions to add rows in header or footer:
add_footer_lines(),
add_footer(),
add_header_lines(),
add_header_row(),
add_header(),
separate_header(),
set_header_footer_df,
set_header_labels()