Learn R Programming

flextable (version 0.4.0)

align: Set text alignment

Description

change text alignment of selected rows and columns of a flextable.

Usage

align(x, i = NULL, j = NULL, align = "left", part = "body")

Arguments

x

a flextable object

i

rows selection

j

columns selection

align

text alignment - a single character value, expected value is one of 'left', 'right', 'center', 'justify'.

part

partname of the table (one of 'all', 'body', 'header')

Examples

Run this code
# NOT RUN {
ft <- flextable(mtcars)
ft <- align(ft, align = "center")
# }

Run the code above in your browser using DataLab