ft_1 <- flextable(head(iris))
ft_1 <- mk_par(
x = ft_1, i = 1, j = 1, part = "header",
value = as_paragraph("A rather long header that will wrap on two lines")
)
ft_1 <- padding(ft_1, i = 1, j = 1, padding.left = 30, part = "header")
ft_1 <- indentation(ft_1, i = 1, j = 1, hanging = 20, part = "header")
ft_1 <- width(ft_1, j = 1, width = 1.2)
ft_1
Run the code above in your browser using DataLab