The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Create multi level headers

This vignette introduces how to create multi level headers.

library(ftExtra)

Prepare flextable

ft <- iris[1:2, ] %>% flextable()
ft

Split headers

The split_header() function generates multi-level headers by separating original headers (row names) by delimiters.

ft %>% split_header()

The sep argument defines delimiters by regular expression. The default delimiters are . and _. Let’s see what happens when seop = "e"

ft %>% split_header(sep = "e")

Span headers

The span_header() function also generates multi-level headers. Unlike the split_header() function, the span_header() function merges adjacent headers if they have same values.

ft %>% span_header()

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.