You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
GIves an error because PARAMCD is not it alt_counts_df:
Error: Following error encountered in splitting alt_counts_df: Error applying custom split function: no applicable method for 'droplevels' applied to an object of class "NULL"
split: VarLevelSplit (ARM)
occured at path: AVISIT[BASELINE]
Now we add PARAMCD to alt_counts_df to avoid the error:
AVAL CHG
———————————————————————————————————————
BASELINE
A: Drug X (N=134)
DIABP
mean NA NA
SYSBP
mean 151.7 0.0
B: Placebo (N=134)
DIABP
mean 101.1 0.0
SYSBP
mean 149.5 0.0
...
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: