| split_rows | R Documentation |
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).
split_rows(x, max_height, group = integer(0), unit = "in")
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 |
unit |
Unit for |
A list of flextable objects. If no splitting is needed, a single-element list is returned.
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.
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()
ft <- flextable(iris)
ft_pages <- split_rows(ft, max_height = 3)
length(ft_pages)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.