Using a subset of the photolysis dataset within a gt table, we can provide some indentation to all of the row labels in the stub via tab_stub_indent(). Here we provide an indent value of 3 for a very prominent indentation that clearly shows that the row labels are subordinate to the two row group labels in this table ("inorganic reactions" and "carbonyls").
Let’s use a summarized version of the pizzaplace dataset to create a another gt table with row groups and row labels. With summary_rows(), we’ll generate summary rows at the top of each row group. Using tab_stub_indent() we can add indentation to the row labels in the stub.
Indentation of entries in the stub can be controlled by values within a column. Here’s an example of that using the constants dataset, where variations of a row label are mutated to eliminate the common leading text (replacing it with "..."). At the same time, the indentation for those rows is set to 4 in the indent column (value is 0 otherwise). The tab_stub_indent() statement uses from_column(), which passes values from the indent column to the namesake argument. We hide the indent column from view by use of cols_hide().