tab_xl | R Documentation |
To modify the colors used into the Excel table, you can change the
global options with set_color_style
and set_color_breaks
.
tab_xl(
tabs,
path = NULL,
replace = FALSE,
open = rlang::is_interactive(),
colnames_rotation = 0,
remove_tab_vars = TRUE,
colwidth = 10,
print_color_legend = TRUE,
sheets = "auto",
n_min = 0,
titles,
font_text = "DejaVu Sans Condensed",
font_num = "DejaVu Sans",
text_size = 10,
text_size_headers = 9,
text_size_subtext = 9,
hide_near_zero = Inf,
color_type = "text"
)
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.
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. |
font_text , font_num |
Font for text and for numbers. |
text_size , text_size_headers , text_size_subtext |
Font sizes of text elements. |
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 |
The table(s) with formatting and colors in an Excel file, as a side effect.
Invisibly returns tabs
.
forcats::gss_cat %>%
tab(marital, race, pct = "row", color = "diff") %>%
tab_xl()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.