flextable (version 0.5.6)

autofit: Adjusts cell widths and heights

Description

compute and apply optimized widths and heights. This function is to be used when the table widths and heights should automatically be adjusted to fit the size of the content.

Usage

autofit(x, add_w = 0.1, add_h = 0.1)

Arguments

x

flextable object

add_w

extra width to add in inches

add_h

extra height to add in inches

See Also

Other flextable dimensions: dim.flextable, dim_pretty, fit_to_width, flextable_dim, height, width

Examples

Run this code
# NOT RUN {
ft <- flextable(mtcars)
# }
# NOT RUN {
ft <- autofit(ft)
# }
# NOT RUN {
ft
# }

Run the code above in your browser using DataLab