The assumption is of course that they are two tables with identical column names and groupings, where so the main functionality that would need to be implemented would be:
Checking which columns match between the two tables.
Checking groupings.
spanner_cols could then be used to automatically assign the factors of that column as the spanner titles, and as an alternative tab_spanner could be used to manually edit the spanner labels. If multiple cols are given, they would make additional nestings (if that is possible in gt).
There would be some decisions to be made about what would happen to non-matching columns (if they're present I'd argue drop as default.
Just found #255 which was closed last week. Seems to be the same issue; there was no note on why it was closed. Was it completed or just considered out of scope?
Prework
Proposal
I'd really like something like the tbl_merge() function from {gtsummary}, where two tables with similar columns can be "stacked".
For the user it would look something along the lines of:
The assumption is of course that they are two tables with identical column names and groupings, where so the main functionality that would need to be implemented would be:
spanner_cols
could then be used to automatically assign the factors of that column as the spanner titles, and as an alternativetab_spanner
could be used to manually edit the spanner labels. If multiple cols are given, they would make additional nestings (if that is possible in gt).There would be some decisions to be made about what would happen to non-matching columns (if they're present I'd argue drop as default.