Skip to contents

Pre-summarised vital-signs stats partitioned by sex (F / M) across four visits (Baseline, Week 8, Week 16, End of Treatment). Two parameters (Systolic BP, Diastolic BP) emit four statistic rows each (n, Mean (SD), Median, Min, Max). A partition-constant sex_n BigN column rides alongside so banners can inline the denominator via subgroup(label = "Sex: {sex} (N = {sex_n})") without reaching for a separate lookup.

Usage

cdisc_saf_subgroup

Format

A data frame with 64 rows and 10 columns:

sex

Factor (F / M).

sex_n

Integer BigN — number of subjects in the partition row's sex (partition-constant; rides into the banner via {sex_n} template tokens).

paramcd

CDISC parameter code (SYSBP / DIABP).

param

Decoded parameter name ("Systolic BP (mmHg)", "Diastolic BP (mmHg)").

visit

Analysis visit (Baseline, Week 8, Week 16, End of Treatment).

stat_label

Statistic label (n, Mean (SD), Median, Min, Max).

placebo, drug_50, drug_100, Total

Per-arm cell text.

Source

Derived in data-raw/bundle-demo.R from pharmaverseadam::advs filtered to SAFFL == "Y", the three CDISCPILOT01 arms, the SYSBP / DIABP parameters, and the four scheduled visits.

Details

Designed for subgroup() and as_grid() examples: partition by sex (one page set per sex) and nest parameter then visit inside each page for the canonical by-visit CSR shape, or cross sex with visit for a multi-variable partition.

See also

cdisc_saf_n for BigN denominators; subgroup() for the verb this dataset is designed for.

Examples

# 95% pattern: subgroup partition by sex with inline BigN, parameter
# nesting visit inside each sex page. `sex` and `sex_n` auto-hide
# from the body: `sex` because it is the partition `by` column;
# `sex_n` because the banner template references it. No explicit
# `col_spec(visible = FALSE)` needed.
tabular(cdisc_saf_subgroup, titles = "Vital Signs by Visit") |>
  cols(
    paramcd    = col_spec(visible = FALSE),
    param      = col_spec(usage = "group", label = "Parameter"),
    visit      = col_spec(usage = "group", label = "Visit"),
    stat_label = col_spec(label = "Statistic"),
    placebo    = col_spec(label = "Placebo",  align = "decimal"),
    drug_50    = col_spec(label = "Drug 50",  align = "decimal"),
    drug_100   = col_spec(label = "Drug 100", align = "decimal"),
    Total      = col_spec(label = "Total",    align = "decimal")
  ) |>
  subgroup(by = "sex", label = "Sex: {sex} (N = {sex_n})")

 

Vital Signs by Visit

 

StatisticPlaceboDrug 50Drug 100Total
Sex: F (N = 143)
Diastolic BP (mmHg)
Baseline
n208         220         140         568         
Mean (SD) 77.1 (11.2) 76.3 (10.5) 78.0 (10.8) 77.0 (10.8)
Median 78.0        77.3        78.3        78.0       
Min, Max 40  , 110   48  , 100   51  , 108   40  , 110  
 
Week 8
n168         148         104         420         
Mean (SD) 75.1 (9.4)  77.1 (11.0) 76.0 (10.0) 76.0 (10.1)
Median 76.0        79.7        78.0        78.0       
Min, Max 49  , 98    55  , 98    54  , 98    49  , 98   
 
Week 16
n156         100          68         324         
Mean (SD) 74.9 (11.1) 75.6 (10.8) 77.8 (8.9)  75.8 (10.6)
Median 77.7        76.0        79.0        78.0       
Min, Max 49  , 98    55  , 98    56  , 92    49  , 98   
 
End of Treatment
n129         108          81         318         
Mean (SD) 74.0 (10.7) 77.2 (11.9) 76.5 (11.7) 75.7 (11.5)
Median 74.0        79.5        80.0        78.0       
Min, Max 49  , 100   50  , 100   56  , 98    49  , 100  
 
Systolic BP (mmHg)
Baseline
n208         220         140         568         
Mean (SD)141.1 (16.9)139.2 (18.2)140.4 (19.5)140.2 (18.0)
Median141.8       140.0       140.0       140.0       
Min, Max100  , 184  100  , 194  100  , 192  100  , 194  
 
Week 8
n168         148         104         420         
Mean (SD)138.1 (16.5)137.9 (17.8)139.6 (19.0)138.4 (17.6)
Median139.5       135.7       140.0       138.7       
Min, Max100  , 184   92  , 200   91  , 198   91  , 200  
 
Week 16
n156         100          68         324         
Mean (SD)137.9 (17.4)134.8 (15.0)142.0 (15.3)137.8 (16.4)
Median139.5       130.5       140.0       138.0       
Min, Max106  , 190  100  , 168  107  , 186  100  , 190  
 
End of Treatment
n129         108          81         318         
Mean (SD)135.8 (15.3)137.0 (16.1)138.0 (17.4)136.8 (16.1)
Median133.0       133.0       140.0       136.0       
Min, Max 95  , 172   98  , 178  100  , 177   95  , 178  
Sex: M (N = 111)
Diastolic BP (mmHg)
Baseline
n132         164         148         444         
Mean (SD) 77.1 (10.0) 77.1 (8.8)  78.5 (9.8)  77.6 (9.5) 
Median 76.0        76.3        80.0        76.8       
Min, Max 54  , 102   58  , 108   58  , 100   54  , 108  
 
Week 8
n124          92         120         336         
Mean (SD) 75.4 (8.8)  72.7 (9.3)  78.5 (8.1)  75.8 (9.0) 
Median 76.0        72.0        79.7        76.0       
Min, Max 50  , 101   52  , 100   57  , 94    50  , 101  
 
Week 16
n116          68          80         264         
Mean (SD) 75.4 (10.7) 74.6 (8.7)  74.5 (8.8)  74.9 (9.7) 
Median 76.0        73.7        75.5        75.3       
Min, Max 50  , 98    59  , 94    50  , 90    50  , 98   
 
End of Treatment
n 93          69          87         249         
Mean (SD) 75.1 (10.6) 74.0 (9.6)  75.6 (7.8)  75.0 (9.4) 
Median 73.0        74.0        76.0        74.0       
Min, Max 58  , 104   52  , 94    57  , 90    52  , 104  
 
Systolic BP (mmHg)
Baseline
n132         164         148         444         
Mean (SD)130.0 (16.5)136.1 (18.7)135.3 (14.4)134.0 (16.9)
Median130.3       134.0       137.2       132.0       
Min, Max 80  , 170  100  , 188  104  , 170   80  , 188  
 
Week 8
n124          92         120         336         
Mean (SD)133.7 (17.5)130.1 (16.9)131.2 (10.3)131.8 (15.2)
Median131.0       131.0       131.2       131.0       
Min, Max 90  , 189   98  , 180  110  , 158   90  , 189  
 
Week 16
n116          68          80         264         
Mean (SD)130.2 (18.6)129.0 (12.5)126.5 (12.8)128.8 (15.6)
Median130.0       129.7       126.0       128.0       
Min, Max 76  , 178  100  , 158   99  , 154   76  , 178  
 
End of Treatment
n 93          69          87         249         
Mean (SD)128.5 (14.7)126.8 (16.8)127.0 (11.6)127.5 (14.3)
Median130.0       124.0       130.0       130.0       
Min, Max 78  , 164   92  , 162  100  , 156   78  , 164