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)align_nottext_col(x, align = "right", header = TRUE)
align_text_col(x, align = "left", header = TRUE)
align_nottext_col(x, align = "right", header = 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
# 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