align() sets the horizontal alignment of text in selected cells. Two convenience variants — align_text_col() and align_nottext_col() — let you align all text or all non-text columns at once.
Function signatures
Parameters — align()
A
flextable object.Row selector. Accepts integer indices, a one-sided formula, or a logical vector.
NULL selects all rows in the specified part.Column selector. Accepts integer indices, column names, or a formula.
NULL selects all columns.Text alignment. Accepted values:
"left", "right", "center", "justify".You can also pass a character vector with one value per selected column. If the number of columns is a multiple of the vector length, values are recycled.Which part of the table to target:
"body", "header", "footer", or "all".Parameters — align_text_col() and align_nottext_col()
A
flextable object.Alignment to apply. Accepted values:
"left", "right", "center", "justify".Whether to also apply the alignment to the header part.
Whether to also apply the alignment to the footer part.
Return value
The modifiedflextable object.