Calculate optimal fontsize and height of the cell for given height for flextable.

phl_calc_fontsize(data, height)

Arguments

data

data.frame.

height

single numeric value with desired height.

Value

A named numeric vector containing two elements:

  • fs font size

  • height of the single cell.

Examples

x <- tail(iris, 10)[,c(1,5)] phl_calc_fontsize(x, 5)
#> fs height #> 24.0000000 0.4545455