Learn R Programming

ftExtra (version 0.2.0)

separate_header: Separate the header based on delimiters

Description

Separate the header based on delimiters

Usage

separate_header(
  x,
  sep = "[_\\.]",
  theme_fun = flextable::theme_booktabs,
  ...
)

Arguments

x

A flextable object`

sep

Separator between columns.

If character, sep is interpreted as a regular expression. The default value is a regular expression that matches any sequence of non-alphanumeric values.

If numeric, sep is interpreted as character positions to split at. Positive values start at 1 at the far-left of the string; negative value start at -1 at the far-right of the string. The length of sep should be one less than into.

theme_fun

deprecated, use set_flextable_defaults() instead.

...

Passed to theme_fun

Examples

Run this code
# NOT RUN {
iris %>%
  as_flextable() %>%
  separate_header()
# }

Run the code above in your browser using DataLab