View source: R/excel_helpers.R
| modify_output_style | R Documentation |
Modify a previously created style with excel_output_style().
modify_output_style(style_to_modify, ...)
style_to_modify |
A pre created style where only certain elements should be modified while the rest is kept as is. |
... |
Pass in names and corresponding new values for existing style elements. |
modify_output_style() is based on the Output Delivery System (ODS) in 'SAS',
which provides efficient and readable ways to set up different table styles.
With the output style you have full control over the table design. There is no need to think about calculating the right place to input a background color or a border of a certain type and how to do this in a loop for multiple cells. Just input colors, borders, font styles, etc. for the different table parts and everything else is handled by the functions capable of using styles.
The concept basically is: design over complex calculations.
Returns a modified list of named style options.
Creating a custom table style: excel_output_style(),
number_format_style(), modify_number_formats().
Functions that can handle styles: frequencies(), crosstabs(), any_table(),
export_with_style()
# For default values
excel_style <- excel_output_style()
# Set specific options, the rest will be kept as is
excel_style <- excel_style |> modify_output_style(sheet_name = "Sheet",
title_font_bold = FALSE)
# For cells with no background color pass an empty string
excel_style <- excel_style |> modify_output_style(table_back_color = "")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.