clin_auto_page {clinify} | R Documentation |
Enable Word Auto-Pagination Using Group Variable
Description
This function uses the applies the functionality flextable::keep_with_next()
by automatically building the row indices using some grouping variable. Each group
identified by the variable (i.e. when the value of the variable changes) will be set
as a "keep_with_next" group in Word. Using this functionality, Word will attempt not to
break that group across pages, enabling smoother pagination without having to do specific
calculations of page breaks.
Usage
clin_auto_page(x, group_var, when = c("change", "notempty"), drop = FALSE)
Arguments
x |
A clintable object |
group_var |
A string containing a variable name of the input dataset used to calculate groups |
when |
Character string indicating when to apply padding:
|
drop |
Keep or drop the 'group_var“ variable |
Value
A clintable object
Examples
clintable(mtcars) |>
clin_auto_page("gear")