A one-call subject-level AE listing: the usual columns in the usual order, one row per AE record (not de-duplicated – that is the point of a listing, as opposed to tab_ae_summary()/tab_ae_soc()), sorted by subject.

lst_ae(adae, vars = NULL, ...)

Arguments

adae

Adverse-event analysis dataset.

vars

Character vector of columns to include, in order. Default: the intersection of c("USUBJID", "AEBODSYS", "AEDECOD", "AESTDTC", "AEENDTC", "ASEV", "AESER", "AEREL", "AEOUT") with the columns present in adae.

...

Additional sort keys passed on to dplyr::arrange() (rows are always sorted by USUBJID first) – the escape hatch for study-specific ordering, e.g. lst_ae(adae, AESTDTC).

Value

An object of class c("sasparity_listing", "sasparity_table") wrapping a tibble::tibble() listing. $table holds the plain tibble.

SAS equivalent

A %aelist macro / PROC REPORT (or PROC SQL + PROC PRINT) listing sorted BY USUBJID – Listing 16.2.x "Adverse Events". See parity_note().

Examples

adae <- sasparity_example("adae")
lst_ae(adae)
#> 
#> ── Adverse Event Listing ──
#> 
#>  SAS equivalent: %aelist macro / PROC REPORT listing sorted BY USUBJID (Listing 16.2.x Adverse Events)
#>  Denominator: 8 record(s) across 6 subject(s); not de-duplicated (a listing, not a count)
#> # A tibble: 8 × 9
#>   USUBJID AEBODSYS               AEDECOD AESTDTC AEENDTC ASEV  AESER AEREL AEOUT
#>   <chr>   <chr>                  <chr>   <chr>   <chr>   <chr> <chr> <chr> <chr>
#> 1 S01     GASTROINTESTINAL DISO… NAUSEA  2021-0… 2021-0… MILD  N     POSS… RECO…
#> 2 S01     GASTROINTESTINAL DISO… NAUSEA  2021-0… 2021-0… MILD  N     POSS… RECO…
#> 3 S01     GASTROINTESTINAL DISO… VOMITI… 2021-0… 2021-0… MODE… N     NONE  RECO…
#> 4 S02     SKIN AND SUBCUTANEOUS… RASH    2021-0… 2021-0… MODE… Y     PROB… RECO…
#> 5 S03     GASTROINTESTINAL DISO… NAUSEA  2021-0… 2021-0… MILD  N     NONE  RECO…
#> 6 S06     SKIN AND SUBCUTANEOUS… RASH    2021-0… 2021-0… MILD  N     POSS… RECO…
#> 7 S07     GASTROINTESTINAL DISO… VOMITI… 2021-0… 2021-0… MODE… N     NONE  RECO…
#> 8 S08     CARDIAC DISORDERS      CARDIA… 2021-0… NA      SEVE… Y     PROB… FATAL
lst_ae(adae, vars = c("USUBJID", "AEDECOD", "AESER"))
#> 
#> ── Adverse Event Listing ──
#> 
#>  SAS equivalent: %aelist macro / PROC REPORT listing sorted BY USUBJID (Listing 16.2.x Adverse Events)
#>  Denominator: 8 record(s) across 6 subject(s); not de-duplicated (a listing, not a count)
#> # A tibble: 8 × 3
#>   USUBJID AEDECOD        AESER
#>   <chr>   <chr>          <chr>
#> 1 S01     NAUSEA         N    
#> 2 S01     NAUSEA         N    
#> 3 S01     VOMITING       N    
#> 4 S02     RASH           Y    
#> 5 S03     NAUSEA         N    
#> 6 S06     RASH           N    
#> 7 S07     VOMITING       N    
#> 8 S08     CARDIAC ARREST Y