Skip to contents

Apply manual bolding to a flextable

Usage

apply_bold_manual(flx, bold_manual)

Arguments

flx

(flextable)
a flextable object to which manual bolding will be applied.

bold_manual

(list)
a named list containing the specification for the manual bolding, in the format list("header" = list("i" = c(), "j" = c()), "body" = list("i" = c(), "j" = c()))

Value

a flextable object with the bolding updated.

Examples

df <- head(iris)
flx <- flextable::flextable(df)
special_bold <- list(
  "header" = list("i" = 1, "j" = c(1, 3)),
  "body" = list("i" = c(1, 2), "j" = 1)
)
apply_bold_manual(flx, special_bold)

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