Open anajens opened 10 months ago
@Melkiades I added a second example to the issue.
tl;dr : alt_counts_df (ADSL) needs to be pre-processed to include potentially all variables from the row splits in the layout (depending on type of split functions used).
From rtables perspective this makes sense, it's just not very user friendly.
What happened?
In the layout we first split by AVISIT (non-population dataset variable) and then ARM. When trying to add the row counts (N=xx) form
alt_counts_df = ADSL
there is an error because ADSL does not include AVISIT.Not very nice workaround is to add a dummy AVISIT to ADSL and repeat the dataset as a many times as there are levels in AVISIT.
Noticed this when working on PKPT03.
Error
Desired output
Example 2: With trim_levels_in_group split function
Set to NA a specific combination of the split vars - we want to keep this displayed in the table as missing
GIves an error because PARAMCD is not it alt_counts_df:
Now we add PARAMCD to alt_counts_df to avoid the error:
And get the desired table: