Skip to contents

change font size of selected rows and columns of a flextable.

Usage

fontsize(x, i = NULL, j = NULL, size = 11, part = "body")

Arguments

x

a flextable object

i

rows selection

j

columns selection

size

integer value (points)

part

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

See also

Other sugar functions for table style: align(), bg(), bold(), color(), empty_blanks(), font(), highlight(), italic(), keep_with_next(), line_spacing(), padding(), rotate(), tab_settings(), valign()

Examples

ft <- flextable(head(iris))
ft <- fontsize(ft, size = 14, part = "header")
ft <- fontsize(ft, size = 14, j = 2)
ft <- fontsize(ft, size = 7, j = 3)
ft

Sepal.Length

Sepal.Width

Petal.Length

Petal.Width

Species

5.1

3.5

1.4

0.2

setosa

4.9

3.0

1.4

0.2

setosa

4.7

3.2

1.3

0.2

setosa

4.6

3.1

1.5

0.2

setosa

5.0

3.6

1.4

0.2

setosa

5.4

3.9

1.7

0.4

setosa