
Last chance! 50% off unlimited learning
Sale ends in
change paddings of selected rows and columns of a flextable.
padding(
x,
i = NULL,
j = NULL,
padding = NULL,
padding.top = NULL,
padding.bottom = NULL,
padding.left = NULL,
padding.right = NULL,
part = "body"
)
a flextable object
rows selection
columns selection
padding (shortcut for top, bottom, left and right), unit is pts (points).
padding top, unit is pts (points).
padding bottom, unit is pts (points).
padding left, unit is pts (points).
padding right, unit is pts (points).
partname of the table (one of 'all', 'body', 'header', 'footer')
ft_1 <- flextable(head(iris))
ft_1 <- theme_vader(ft_1)
ft_1 <- padding(ft_1, padding.top = 4, part = "all")
ft_1 <- padding(ft_1, j = 1, padding.right = 40)
ft_1 <- padding(ft_1, i = 3, padding.top = 40)
ft_1 <- padding(ft_1, padding.top = 10, part = "header")
ft_1 <- padding(ft_1, padding.bottom = 10, part = "header")
ft_1 <- autofit(ft_1)
ft_1
Run the code above in your browser using DataLab