I have a tibble with two columns:
library('flextable')
library("tidyverse")
df <- tibble('Long' = "Long Long Long Long Long Text",
'Short' = 'Short Text')
Transform to a flextable:
ft <- flextable(data = df,
theme_fun = theme_zebra)
So, I have a table with two equal columns:
Now I make the left column wider than the left one:
ft <- ft %>%
width(j = 1,
width = 4) %>%
width(j = 2,
width = 1)
And next I add a header:
ft <- ft %>%
add_header_row(values = "Header", colwidths = 2)
As you can see, I now have the flextable with the header and columns of the SAME WIDTH. And no formatting helps anymore. How can I change the width of the columns?


