powered by
change text alignment of selected rows and columns of a flextable.
align(x, i = NULL, j = NULL, align = "left", part = "body")align_text_col(x, align = "left", header = TRUE, footer = TRUE)align_nottext_col(x, align = "right", header = TRUE, footer = TRUE)
align_text_col(x, align = "left", header = TRUE, footer = TRUE)
align_nottext_col(x, align = "right", header = TRUE, footer = TRUE)
a flextable object
rows selection
columns selection
text alignment - a single character value, expected value is one of 'left', 'right', 'center', 'justify'.
partname of the table (one of 'all', 'body', 'header', 'footer')
should the header be aligned with the body
should the footer be aligned with the body
Other sugar functions for table style: bg(), bold(), color(), empty_blanks(), fontsize(), font(), italic(), padding(), rotate(), valign()
bg()
bold()
color()
empty_blanks()
fontsize()
font()
italic()
padding()
rotate()
valign()
# NOT RUN { ft <- flextable(mtcars) ft <- align(ft, align = "center") ft <- flextable(mtcars) ft <- align_text_col(ft, align = "left") ft <- align_nottext_col(ft, align = "right") ft # }
Run the code above in your browser using DataLab