powered by
change background color of selected rows and columns of a flextable.
bg(x, i = NULL, j = NULL, bg, part = "body")
a flextable object
rows selection
columns selection
color to use as background color
partname of the table (one of 'all', 'body', 'header', 'footer')
Other sugar functions for table style: align, bold, color, empty_blanks, fontsize, font, italic, padding, rotate, valign
align
bold
color
empty_blanks
fontsize
font
italic
padding
rotate
valign
# NOT RUN { ft <- flextable(mtcars) ft <- bg(ft, bg = "#DDDDDD", part = "header") # }
Run the code above in your browser using DataLab