Create a officer::fp_border() object whose unspecified
arguments inherit from set_flextable_defaults() (border color, width).
Use fp_border_default() instead of officer::fp_border() so that
borders automatically match the table's default style.
Usage
fp_border_default(
color = flextable_global$defaults$border.color,
style = "solid",
width = flextable_global$defaults$border.width
)See also
Other functions for defining formatting properties:
fp_text_default()
Examples
library(flextable)
set_flextable_defaults(
border.color = "orange"
)
z <- flextable(head(cars))
z <- theme_vanilla(z)
z <- vline(
z,
j = 1, part = "all",
border = officer::fp_border()
)
z <- vline(
z,
j = 2, part = "all",
border = fp_border_default()
)
z
speed
dist
4
2
4
10
7
4
7
22
8
16
9
10
init_flextable_defaults()
