flextable (version 0.5.6)

font: Set font

Description

change font of selected rows and columns of a flextable.

Usage

font(x, i = NULL, j = NULL, fontname, part = "body")

Arguments

x

a flextable object

i

rows selection

j

columns selection

fontname

string value, the font name.

part

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

See Also

Other sugar functions for table style: align, bg, bold, color, empty_blanks, fontsize, italic, padding, rotate, valign

Examples

Run this code
# NOT RUN {
require("gdtools")
fontname <- "Times"

if( !font_family_exists(fontname) ){
  ft <- flextable(head(iris))
  ft <- font(ft, fontname = fontname, part = "header")
}
# }

Run the code above in your browser using DataLab