The gt_add_divider function takes an existing gt_tbl object and
adds borders or dividers to specific columns.
Usage
gt_add_divider(
gt_object,
columns,
sides = "right",
color = "grey",
style = "solid",
weight = px(2),
include_labels = TRUE
)Arguments
- gt_object
An existing gt table object of class
gt_tbl- columns
Specific columns to apply color to, accepts either
tidyevalcolum names or columns by position.- sides
The border sides to be modified. Options include
"left","right","top", and"bottom". For all borders surrounding the selected cells, we can use the `"all"“ option.- color, style, weight
The border color, style, and weight. The
colorcan be defined with a color name or with a hexadecimal color code. The defaultcolorvalue is"#00FFFFFF"(black). Thestylecan be one of either"solid"(the default),"dashed", or"dotted". Theweightof the border lines is to be given in pixel values (thepx()helper function is useful for this. The default value forweightis"1px".- include_labels
A logical, either
TRUEorFALSEindicating whether to also add dividers through the column labels.
See also
Other Utilities:
add_text_img(),
fa_icon_repeat(),
fmt_pad_num(),
fmt_pct_extra(),
fmt_symbol_first(),
generate_df(),
gt_badge(),
gt_double_table(),
gt_duplicate_column(),
gt_fa_rank_change(),
gt_fa_rating(),
gt_highlight_cols(),
gt_highlight_rows(),
gt_img_border(),
gt_img_circle(),
gt_img_multi_rows(),
gt_img_rows(),
gt_index(),
gt_merge_stack(),
gt_merge_stack_color(),
gt_two_column_layout(),
gtsave_extra(),
img_header(),
pad_fn(),
tab_style_by_grp()

