Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

header_separate

Separate table headers and add additional header rows based on grouping


Description

When you create a summary table for either model or basic summary stats in R, you usually end up having column names in the form of "a_mean", "a_sd", "b_mean" and "b_sd". This function streamlines the process of renaming these column names and adding extra header rows using add_header_above.

Usage

header_separate(kable_input, sep = "[^[:alnum:]]+")

Arguments

kable_input

Output of knitr::kable() with format specified

sep

A regular expression separator between groups. The default value is a regular expression that matches any sequence of non-alphanumeric values.


kableExtra

Construct Complex Table with 'kable' and Pipe Syntax

v1.3.4
MIT + file LICENSE
Authors
Hao Zhu [aut, cre] (<https://orcid.org/0000-0002-3386-6076>), Thomas Travison [ctb], Timothy Tsai [ctb], Will Beasley [ctb], Yihui Xie [ctb], GuangChuang Yu [ctb], Stéphane Laurent [ctb], Rob Shepherd [ctb], Yoni Sidi [ctb], Brian Salzer [ctb], George Gui [ctb], Yeliang Fan [ctb], Duncan Murdoch [ctb], Bill Evans [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.