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 = "auto",
  print_ci = FALSE,
  print_color_legend = TRUE,
  sheets = "tabs",
  min_counts = 30,
  hide_near_zero = "auto",
  color_type = "text"
)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 "tabxplor.export_dir" with link[base:options]{options}
to change default directory.
Use replace = TRUE to overwrite existing files. Use open = TRUE
if you don't want to automatically open the tables in Excel (or another
software associated with .xlsx files).
Rotate the names of columns to an angle (in degrees).
By default, tab_vars columns are removed to gain space.
Set to FALSE to keep them.
The standard width for numeric columns, as a number.
Default to "auto".
By default provided confidence intervals are printed in another table,
left to the base table. Set to FALSE to dismiss.
Should the color legends be printed with the subtexts ?
The Excel sheets options :
"tabs": a new sheet is created for each table
"unique": all tables are on the same sheet
"auto": subsequent tables with the same columns are printed on the
same sheets
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 30.
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 Inf not to use
this feature.
By default, the background is colored. Set to text to color
the text instead.
The table(s) with formatting and colors in an Excel file, as a side effect.
Invisibly returns tabs.
# NOT RUN {
forcats::gss_cat %>%
  tab(marital, race, pct = "row", color = "diff") %>%
  tab_xl()
  
# }
Run the code above in your browser using DataLab