View source: R/flextable_sizes.R
| fit_to_width | R Documentation |
Decrease font size incrementally until the table fits
within max_width.
To constrain width by wrapping text instead, see fit_columns().
To size columns to their content without a width constraint,
see autofit().
fit_to_width(x, max_width, inc = 1L, max_iter = 20, unit = "in")
x |
a 'flextable' object, see flextable-package to learn how to create 'flextable' object. |
max_width |
maximum width to fit in inches |
inc |
the font size decrease for each step |
max_iter |
maximum iterations |
unit |
unit for max_width, one of "in", "cm", "mm". |
Other functions for flextable size management:
autofit(),
dim.flextable(),
dim_pretty(),
fit_columns(),
flextable_dim(),
height(),
hrule(),
ncol_keys(),
nrow_part(),
set_table_properties(),
width()
ft_1 <- qflextable(head(mtcars))
ft_1 <- width(ft_1, width = 1)
ft_1
ft_2 <- fit_to_width(ft_1, max_width = 4)
ft_2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.