change font of selected rows and columns of a flextable.
font(x, i = NULL, j = NULL, fontname, part = "body")
a flextable object
rows selection
columns selection
string value, the font name.
partname of the table (one of 'all', 'body', 'header', 'footer')
Other sugar functions for table style: align, bg, bold, color, empty_blanks, fontsize, italic, padding, rotate, valign
align
bg
bold
color
empty_blanks
fontsize
italic
padding
rotate
valign
# 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