View source: R/row_group_plan.R
row_grp_plan | R Documentation |
Define the look of the table groups on the output. This function allows you to add spaces after blocks and allows you to control how the groups are viewed whether they span the entire table or are nested as a column.
row_grp_plan(..., label_loc = element_row_grp_loc(location = "indented"))
... |
Row group structure objects separated by commas |
label_loc |
|
row_grp_plan object
row_grp_structure()
for more details on how to specify row group
structures, element_block()
for more details on how to specify spacing
between each group, element_row_grp_loc()
for more details on how to
specify whether row group titles span the entire table or collapse.
## single grouping variable example
sample_grp_plan <- row_grp_plan(
row_grp_structure(group_val = c("A","C"), element_block(post_space = "---")),
row_grp_structure(group_val = c("B"), element_block(post_space = " ")),
label_loc = element_row_grp_loc(location = "column")
)
## example with multiple grouping variables
sample_grp_plan <- row_grp_plan(
row_grp_structure(group_val = list(grp1 = "A", grp2 = "b"), element_block(post_space = " ")),
label_loc = element_row_grp_loc(location = "spanning")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.