gt
gt copied to clipboard
Feature Request: Allow Nested Row Groups
Groups of rows in data often are nested, and it would be helpful to have row groups support multi-level nesting. As an example from my work, I generate tables to describe adverse events (side effects) in clinical trials of new medicines. Those tables are grouped by organ system (like neurological) then another level of nesting is the group of symptoms (like brain and peripheral nerves) then the actual event (like headache, hallucinations, tremors, or pain in extremities). In practice, there is more complexity than this (https://en.wikipedia.org/wiki/MedDRA).
It would help if the tables could have this multi-level representation like:
| Title |
| Stub | Col1 | Col2 |
| Group level 1 |
| Group level 2 |
| Row 1 | R1C1 | R2C2 |
This is of course a good idea. I’ll have to give some serious thought about how to scale up row groups to allow for nesting.
I've encountered this problem as well. May I suggest an idea? Concatenate tables. Adapting the previous example, it might be less complicated to simply join two tables
Table 1:
| Title |
| Stub | Col1 | Col2 |
| Group A |
| Row 1 | R1C1 | R2C2 |
Table 2:
| Title |
| Stub | Col1 | Col2 |
| Group B |
| Row 1 | R1C1 | R2C2 |
| Row 2 | R1C1 | R2C2 |
| Group C |
| Row 1 | R1C1 | R2C2 |
| Row 2 | R1C1 | R2C2 |
like this:
| Title |
| Stub | Col1 | Col2 |
| Category I |
| Group A |
| Row 1 | R1C1 | R2C2 |
| Category II |
| Group B |
| Row 1 | R1C1 | R2C2 |
| Row 2 | R1C1 | R2C2 |
| Group C |
| Row 1 | R1C1 | R2C2 |
| Row 2 | R1C1 | R2C2 |
It would be even better to allow the user to hide a particular level 1 or level 2 headings, to allow for some (poorly conceived) inconsitent table structure:
| Title |
| Stub | Col1 | Col2 |
| Category I |
| Row 1 | R1C1 | R2C2 |
| Category II |
| Group B |
| Row 1 | R1C1 | R2C2 |
| Row 2 | R1C1 | R2C2 |
| Group C |
| Row 1 | R1C1 | R2C2 |
| Row 2 | R1C1 | R2C2 |
Much needed
Sorry for the delay on this. Agree this is needed and I hope to work on this soon.
Just curious where this is. It was one of the first things I looked for when creating clinical tables. The table below I manually created the blanks under the row group values.
Just wanted to follow and see if there are any updates on this?
want to follow too
Would be great to have this