tab_xl {tabxplor} | R Documentation |
Excel output for tabxplor tables, with formatting and colors
Description
To modify the colors used into the Excel table, you can change the
global options with set_color_style
and set_color_breaks
.
Usage
tab_xl(
tabs,
path = NULL,
replace = FALSE,
open = rlang::is_interactive(),
colnames_rotation = 0,
remove_tab_vars = TRUE,
colwidth = "auto",
print_ci = FALSE,
print_color_legend = TRUE,
sheets = "tabs",
n_min = 0,
titles,
hide_near_zero = "auto",
color_type = "text"
)
Arguments
tabs |
A table made with |
path , replace , open |
The name, and possibly the path, of the Excel file to
create (possibly without the .xlsx extension). Default path to temporary directory.
Set global option |
colnames_rotation |
Rotate the names of columns to an angle (in degrees). |
remove_tab_vars |
By default, |
colwidth |
The standard width for numeric columns, as a number.
Default to |
print_ci |
Set to |
print_color_legend |
Should the color legends be printed with the subtexts ? |
sheets |
The Excel sheets options :
|
n_min |
The total count under which a column or row is turned pale grey because there is not enough observation for it to be significant. Default to 0 (not used). |
titles |
The titles of the different tables, as a character vector. When missing titles are given based on the names of the variables. |
hide_near_zero |
By default all cells displayed as 0 (even rounded)
turn pale grey, to make the distribution of empty cells (and other cells) more visible.
Provide a number to turn grey every cell below it. Set to |
color_type |
By default, the text is colored. Set to |
Value
The table(s) with formatting and colors in an Excel file, as a side effect.
Invisibly returns tabs
.
Examples
forcats::gss_cat %>%
tab(marital, race, pct = "row", color = "diff") %>%
tab_xl()