Split a flextable into a list of flextables whose body
rows fit within a given height (in inches). Header and footer are
repeated on every page. An optional group argument keeps row groups
together (no page break inside a group).
Usage
split_rows(x, max_height, group = integer(0), unit = "in")Arguments
- x
a 'flextable' object, see flextable-package to learn how to create 'flextable' object.
- max_height
Maximum height for each page, including header and footer (in inches by default).
- group
Integer vector of body row indices that start a new group. Rows belonging to the same group are kept together on a single page. Default is
integer(0)(no grouping, every row is independent).- unit
Unit for
max_height, one of"in","cm","mm".
Note
Footnotes are currently repeated on every page, even when they reference rows that only appear on a specific page. This limitation will be resolved in a future version when footnotes are restructured to track their association with body rows.
See also
Other row and column operations:
add_body(),
add_body_row(),
add_footer(),
add_footer_lines(),
add_footer_row(),
add_header(),
add_header_lines(),
add_header_row(),
delete_columns(),
delete_part(),
delete_rows(),
paginate(),
separate_header(),
set_header_footer_df,
set_header_labels(),
split_columns(),
split_to_pages()
