如果我有一个没有标题的flextable
,我如何添加一个?在下面的例子中,我人为地设置了场景.也就是说,我想把flexiris_without_head
变成flexiris_with_head
.
library(flextable) # version 0.9.2
flexiris_with_head <- flextable(iris)
flexiris_with_head
flexiris_without_head <- flexiris_with_head %>%
delete_part(part = "header")
flexiris_without_head
If anyone is interested in more context:
I am primarily working with huxtable
objects, which I, however, need to translate to flextable
objects for docx output purposes. Using huxtable::as_flextable()
leaves me without a (technical) header, which is an issue for long tables because the headers do not roll over to the next docx page anymore.