return minimum estimated widths and heights for each table columns and rows in inches.

dim_pretty(x, part = "all", unit = "in")

Arguments

x

flextable object

part

partname of the table (one of 'all', 'body', 'header' or 'footer')

unit

unit for returned values, one of "in", "cm", "mm".

line breaks

Soft returns (a line break in a paragraph) are not supported. Function dim_pretty will return wrong results if \n are used (they will be considered as "").

See also

Other flextable dimensions: autofit(), dim.flextable(), fit_to_width(), flextable_dim(), height(), hrule(), ncol_keys(), nrow_part(), set_table_properties(), width()

Examples

ftab <- flextable(head(mtcars))
dim_pretty(ftab)
#> $widths
#>  [1] 0.5279654 0.4020431 0.5011845 0.4767908 0.5253545 0.6225563 0.6225563
#>  [8] 0.3551952 0.4276304 0.5325905 0.5225943
#> 
#> $heights
#> [1] 0.3330395 0.3007383 0.3007383 0.3007383 0.3007383 0.3007383 0.3007383
#>