Form table column names
Usage
tab_cols(
cols,
cols_replace = NULL,
cols_rename = NULL,
cols_blank = NULL,
cols_split = NULL,
cols_bold = FALSE,
cols_break = "...",
cols_extra = NULL,
cols_omit = NULL,
...
)Arguments
- cols
the starting set of table column names
- cols_replace
a character vector with the same length as the number of output table columns; use this to completely replace the names (as opposed to one by on editing with
col_rename)- cols_rename
a
name = valuecharacter vector to translate column names to table names; ; see alsost_rename()- cols_blank
a character vector of column names that will not be printed in the table header; see also
st_blank()- cols_split
a string that is used to split column labels into tag (on the left) or name (on the right); if supplied, then
col_splitwill be used to remove the tag; for example, a column namedx.WTwould be renamedWTifcols_splitwas set to.- cols_bold
if
TRUE, table column names are rendered with bold font- cols_break
character sequence to break column names into new lines
- cols_extra
a data frame with extra column header information; the data frame should have the same columns, in the same order as the table data frame (see
dataargument tostable()); the data frame can have any number of rows; all of the rows incols_extrawill be placed between the column label and the unit (ifunitsis supplied)- cols_omit
if
TRUE, then column names are suppressed in the table output along with units; column spanners are retained- ...
not used
