Skip to contents

[Stable] Function takes datasets and creates CDISCTealData object which can be used in teal applications.

Usage

cdisc_data(..., join_keys, code = "", check = FALSE)

Arguments

...

(TealDataConnector, TealDataset or TealDatasetConnector) elements to include where ADSL data is mandatory.

join_keys

(JoinKeys) or a single (JoinKeySet)
(optional) object with datasets column names used for joining. If empty then it would be automatically derived basing on intersection of datasets primary keys

code

(character) code to reproduce the datasets.

check

(logical) reproducibility check - whether to perform a check that the pre-processing code included in the object definitions actually produces those objects. If check is true and preprocessing code is empty an error will be thrown.

Value

a CDISCTealData object

Details

This function checks if there were keys added to all data sets

Note

This function does not automatically assign keys to TealDataset and TealDatasetConnector objects passed to it. If the keys are needed they should be assigned before calling cdisc_data. See example:

Examples

library(scda)

latest_data <- synthetic_cdisc_data("latest")
ADSL <- latest_data$adsl
ADTTE <- latest_data$adtte

# basic example
cdisc_data(
  cdisc_dataset("ADSL", ADSL),
  cdisc_dataset("ADTTE", ADTTE),
  code = 'ADSL <- synthetic_cdisc_data("latest")$adsl
          ADTTE <- synthetic_cdisc_data("latest")$adtte',
  check = TRUE
)
#> A CDISCTealData object containing 2 TealDataset/TealDatasetConnector object(s) as element(s):
#> --> Element 1:
#> A CDISCTealDataset object containing the following data.frame (400 rows and 56 columns):
#>   STUDYID               USUBJID SUBJID SITEID AGE  AGEU SEX
#> 1 AB12345  AB12345-CHN-3-id-128 id-128  CHN-3  32 YEARS   M
#> 2 AB12345 AB12345-CHN-15-id-262 id-262 CHN-15  35 YEARS   M
#> 3 AB12345  AB12345-RUS-3-id-378 id-378  RUS-3  30 YEARS   F
#> 4 AB12345 AB12345-CHN-11-id-220 id-220 CHN-11  26 YEARS   F
#> 5 AB12345  AB12345-CHN-7-id-267 id-267  CHN-7  40 YEARS   M
#> 6 AB12345 AB12345-CHN-15-id-201 id-201 CHN-15  49 YEARS   M
#>                        RACE                 ETHNIC COUNTRY DTHFL         INVID
#> 1                     ASIAN     HISPANIC OR LATINO     CHN     Y  INV ID CHN-3
#> 2 BLACK OR AFRICAN AMERICAN NOT HISPANIC OR LATINO     CHN     N INV ID CHN-15
#> 3                     ASIAN NOT HISPANIC OR LATINO     RUS     N  INV ID RUS-3
#> 4                     ASIAN NOT HISPANIC OR LATINO     CHN     N INV ID CHN-11
#> 5                     ASIAN NOT HISPANIC OR LATINO     CHN     N  INV ID CHN-7
#> 6                     ASIAN NOT HISPANIC OR LATINO     CHN     Y INV ID CHN-15
#>           INVNAM            ARM ARMCD         ACTARM ACTARMCD         TRT01P
#> 1  Dr. CHN-3 Doe      A: Drug X ARM A      A: Drug X    ARM A      A: Drug X
#> 2 Dr. CHN-15 Doe C: Combination ARM C C: Combination    ARM C C: Combination
#> 3  Dr. RUS-3 Doe C: Combination ARM C C: Combination    ARM C C: Combination
#> 4 Dr. CHN-11 Doe     B: Placebo ARM B     B: Placebo    ARM B     B: Placebo
#> 5  Dr. CHN-7 Doe     B: Placebo ARM B     B: Placebo    ARM B     B: Placebo
#> 6 Dr. CHN-15 Doe C: Combination ARM C C: Combination    ARM C C: Combination
#>           TRT01A         TRT02P         TRT02A REGION1 STRATA1 STRATA2
#> 1      A: Drug X     B: Placebo      A: Drug X    Asia       C      S2
#> 2 C: Combination     B: Placebo C: Combination    Asia       C      S1
#> 3 C: Combination      A: Drug X     B: Placebo Eurasia       A      S1
#> 4     B: Placebo     B: Placebo     B: Placebo    Asia       B      S2
#> 5     B: Placebo C: Combination      A: Drug X    Asia       C      S1
#> 6 C: Combination     B: Placebo C: Combination    Asia       C      S2
#>      BMRKR1 BMRKR2 ITTFL SAFFL BMEASIFL BEP01FL AEWITHFL     RANDDT
#> 1 14.424934 MEDIUM     Y     Y        Y       Y        N 2019-02-22
#> 2  4.055463    LOW     Y     Y        N       N        Y 2019-02-26
#> 3  2.803240   HIGH     Y     Y        Y       N        N 2019-02-24
#> 4 10.262734 MEDIUM     Y     Y        Y       Y        N 2019-02-27
#> 5  6.206763    LOW     Y     Y        N       N        N 2019-03-01
#> 6  6.906799 MEDIUM     Y     Y        Y       N        N 2019-03-05
#>               TRTSDTM             TRTEDTM           TRT01SDTM
#> 1 2019-02-24 11:09:18 2022-02-12 03:55:58 2019-02-24 11:09:18
#> 2 2019-02-26 09:05:00 2022-02-26 02:32:36 2019-02-26 09:05:00
#> 3 2019-02-28 03:19:08 2022-02-27 20:46:44 2019-02-28 03:19:08
#> 4 2019-03-01 13:33:03 2022-03-01 07:00:39 2019-03-01 13:33:03
#> 5 2019-03-02 00:09:16 2022-03-01 17:36:52 2019-03-02 00:09:16
#> 6 2019-03-05 15:23:44 2022-02-19 03:34:25 2019-03-05 15:23:44
#>             TRT01EDTM           TRT02SDTM           TRT02EDTM
#> 1 2021-02-11 22:06:46 2021-02-11 22:06:46 2022-02-12 03:55:58
#> 2 2021-02-25 20:43:24 2021-02-25 20:43:24 2022-02-26 02:32:36
#> 3 2021-02-27 14:57:32 2021-02-27 14:57:32 2022-02-27 20:46:44
#> 4 2021-03-01 01:11:27 2021-03-01 01:11:27 2022-03-01 07:00:39
#> 5 2021-03-01 11:47:40 2021-03-01 11:47:40 2022-03-01 17:36:52
#> 6 2021-02-18 21:45:13 2021-02-18 21:45:13 2022-02-19 03:34:25
#>              AP01SDTM            AP01EDTM            AP02SDTM
#> 1 2019-02-24 11:09:18 2021-02-11 22:06:46 2021-02-11 22:06:46
#> 2 2019-02-26 09:05:00 2021-02-25 20:43:24 2021-02-25 20:43:24
#> 3 2019-02-28 03:19:08 2021-02-27 14:57:32 2021-02-27 14:57:32
#> 4 2019-03-01 13:33:03 2021-03-01 01:11:27 2021-03-01 01:11:27
#> 5 2019-03-02 00:09:16 2021-03-01 11:47:40 2021-03-01 11:47:40
#> 6 2019-03-05 15:23:44 2021-02-18 21:45:13 2021-02-18 21:45:13
#>              AP02EDTM       EOSSTT       EOTSTT      EOSDT EOSDY DCSREAS
#> 1 2022-02-12 03:55:58 DISCONTINUED DISCONTINUED 2022-02-12  1084   DEATH
#> 2 2022-02-26 02:32:36    COMPLETED    COMPLETED 2022-02-26  1096    <NA>
#> 3 2022-02-27 20:46:44    COMPLETED    COMPLETED 2022-02-27  1096    <NA>
#> 4 2022-03-01 07:00:39    COMPLETED    COMPLETED 2022-03-01  1096    <NA>
#> 5 2022-03-01 17:36:52    COMPLETED    COMPLETED 2022-03-01  1096    <NA>
#> 6 2022-02-19 03:34:25 DISCONTINUED DISCONTINUED 2022-02-19  1082   DEATH
#>        DTHDT       DTHCAUS        DTHCAT LDDTHELD LDDTHGR1   LSTALVDT DTHADY
#> 1 2022-03-06 ADVERSE EVENT ADVERSE EVENT       22     <=30 2022-03-06   1106
#> 2       <NA>          <NA>          <NA>       NA     <NA> 2022-03-17     NA
#> 3       <NA>          <NA>          <NA>       NA     <NA> 2022-03-11     NA
#> 4       <NA>          <NA>          <NA>       NA     <NA> 2022-03-26     NA
#> 5       <NA>          <NA>          <NA>       NA     <NA> 2022-03-15     NA
#> 6 2022-02-22 ADVERSE EVENT ADVERSE EVENT        3     <=30 2022-02-22   1085
#>   ADTHAUT study_duration_secs
#> 1     Yes            63113904
#> 2    <NA>            63113904
#> 3    <NA>            63113904
#> 4    <NA>            63113904
#> 5    <NA>            63113904
#> 6     Yes            63113904
#> 
#> ...
#> # A tibble: 6 × 56
#>   STUDYID USUBJID     SUBJID SITEID   AGE AGEU  SEX   RACE  ETHNIC COUNTRY DTHFL
#>   <chr>   <chr>       <chr>  <chr>  <int> <fct> <fct> <fct> <fct>  <fct>   <fct>
#> 1 AB12345 AB12345-CH… id-11  CHN-9     28 YEARS F     NATI… HISPA… CHN     Y    
#> 2 AB12345 AB12345-CH… id-352 CHN-16    28 YEARS M     ASIAN UNKNO… CHN     N    
#> 3 AB12345 AB12345-CH… id-186 CHN-1     27 YEARS M     ASIAN NOT H… CHN     N    
#> 4 AB12345 AB12345-CH… id-371 CHN-1     28 YEARS F     ASIAN NOT H… CHN     N    
#> 5 AB12345 AB12345-CH… id-233 CHN-1     36 YEARS F     BLAC… NOT H… CHN     Y    
#> 6 AB12345 AB12345-US… id-131 USA-12    44 YEARS F     AMER… NOT H… USA     N    
#> # … with 45 more variables: INVID <chr>, INVNAM <chr>, ARM <fct>, ARMCD <fct>,
#> #   ACTARM <fct>, ACTARMCD <fct>, TRT01P <fct>, TRT01A <fct>, TRT02P <fct>,
#> #   TRT02A <fct>, REGION1 <fct>, STRATA1 <fct>, STRATA2 <fct>, BMRKR1 <dbl>,
#> #   BMRKR2 <fct>, ITTFL <fct>, SAFFL <fct>, BMEASIFL <fct>, BEP01FL <fct>,
#> #   AEWITHFL <fct>, RANDDT <date>, TRTSDTM <dttm>, TRTEDTM <dttm>,
#> #   TRT01SDTM <dttm>, TRT01EDTM <dttm>, TRT02SDTM <dttm>, TRT02EDTM <dttm>,
#> #   AP01SDTM <dttm>, AP01EDTM <dttm>, AP02SDTM <dttm>, AP02EDTM <dttm>, …
#> --> Element 2:
#> A CDISCTealDataset object containing the following data.frame (2000 rows and 68 columns):
#>   STUDYID              USUBJID SUBJID SITEID AGE  AGEU SEX
#> 1 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 2 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 3 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 4 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 5 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 6 AB12345 AB12345-BRA-1-id-134 id-134  BRA-1  47 YEARS   M
#>                        RACE                 ETHNIC COUNTRY DTHFL        INVID
#> 1 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 2 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 3 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 4 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 5 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 6                     WHITE NOT HISPANIC OR LATINO     BRA     Y INV ID BRA-1
#>          INVNAM       ARM ARMCD    ACTARM ACTARMCD    TRT01P    TRT01A
#> 1 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 2 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 3 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 4 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 5 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 6 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#>           TRT02P    TRT02A       REGION1 STRATA1 STRATA2   BMRKR1 BMRKR2 ITTFL
#> 1 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 2 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 3 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 4 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 5 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 6     B: Placebo A: Drug X South America       B      S2 6.462991    LOW     Y
#>   SAFFL BMEASIFL BEP01FL AEWITHFL     RANDDT             TRTSDTM
#> 1     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 2     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 3     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 4     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 5     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 6     Y        Y       N        N 2020-11-03 2020-11-04 03:50:33
#>               TRTEDTM           TRT01SDTM           TRT01EDTM
#> 1 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 2 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 3 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 4 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 5 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 6 2022-02-20 03:01:31 2020-11-04 03:50:33 2021-02-19 21:12:19
#>             TRT02SDTM           TRT02EDTM            AP01SDTM
#> 1 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 2 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 3 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 4 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 5 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 6 2021-02-19 21:12:19 2022-02-20 03:01:31 2020-11-04 03:50:33
#>              AP01EDTM            AP02SDTM            AP02EDTM       EOSSTT
#> 1 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 2 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 3 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 4 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 5 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 6 2021-02-19 21:12:19 2021-02-19 21:12:19 2022-02-20 03:01:31 DISCONTINUED
#>         EOTSTT      EOSDT EOSDY            DCSREAS      DTHDT       DTHCAUS
#> 1 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 2 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 3 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 4 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 5 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 6 DISCONTINUED 2022-02-20   473              DEATH 2022-03-16 ADVERSE EVENT
#>          DTHCAT LDDTHELD LDDTHGR1   LSTALVDT DTHADY ADTHAUT study_duration_secs
#> 1          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 2          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 3          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 4          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 5          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 6 ADVERSE EVENT       24     <=30 2022-03-16    497     Yes            63113904
#>   ASEQ TTESEQ                          PARAM PARAMCD      AVAL AVALU       ADTM
#> 1    2      2 Duration of Confirmed Response    CRSD 1273.8498  DAYS 2021-01-25
#> 2    4      4            Event Free Survival     EFS  135.9787  DAYS 2022-02-11
#> 3    3      3               Overall Survival      OS 1759.8678  DAYS 2021-07-16
#> 4    1      1      Progression Free Survival     PFS  241.1912  DAYS 2020-12-13
#> 5   NA     NA  Total Number of Exacerbations     TNE    1.0000 COUNT       <NA>
#> 6    4      4 Duration of Confirmed Response    CRSD  544.5728  DAYS 2021-06-22
#>   ADY CNSR                    EVNTDESC                   CNSDTDSC lgTMATRSK
#> 1 323    1 Last Date Known To Be Alive End of AE Reporting Period        NA
#> 2 705    0                       Death                                   NA
#> 3 495    0                       Death                                   NA
#> 4 280    0         Disease Progression                                   NA
#> 5  NA    1                        <NA> End of AE Reporting Period -2.802988
#> 6 230    0                       Death                                   NA
#> 
#> ...
#> # A tibble: 6 × 68
#>   STUDYID USUBJID     SUBJID SITEID   AGE AGEU  SEX   RACE  ETHNIC COUNTRY DTHFL
#>   <chr>   <chr>       <chr>  <chr>  <int> <fct> <fct> <fct> <fct>  <fct>   <fct>
#> 1 AB12345 AB12345-US… id-206 USA-8     34 YEARS F     ASIAN NOT H… USA     N    
#> 2 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> 3 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> 4 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> 5 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> 6 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> # … with 57 more variables: INVID <chr>, INVNAM <chr>, ARM <fct>, ARMCD <fct>,
#> #   ACTARM <fct>, ACTARMCD <fct>, TRT01P <fct>, TRT01A <fct>, TRT02P <fct>,
#> #   TRT02A <fct>, REGION1 <fct>, STRATA1 <fct>, STRATA2 <fct>, BMRKR1 <dbl>,
#> #   BMRKR2 <fct>, ITTFL <fct>, SAFFL <fct>, BMEASIFL <fct>, BEP01FL <fct>,
#> #   AEWITHFL <fct>, RANDDT <date>, TRTSDTM <dttm>, TRTEDTM <dttm>,
#> #   TRT01SDTM <dttm>, TRT01EDTM <dttm>, TRT02SDTM <dttm>, TRT02EDTM <dttm>,
#> #   AP01SDTM <dttm>, AP01EDTM <dttm>, AP02SDTM <dttm>, AP02EDTM <dttm>, …

# Example with keys
cdisc_data(
  cdisc_dataset("ADSL", ADSL,
    keys = c("STUDYID", "USUBJID")
  ),
  cdisc_dataset("ADTTE", ADTTE,
    keys = c("STUDYID", "USUBJID", "PARAMCD"),
    parent = "ADSL"
  ),
  join_keys = join_keys(
    join_key(
      "ADSL",
      "ADTTE",
      c("STUDYID" = "STUDYID", "USUBJID" = "USUBJID")
    )
  ),
  code = 'ADSL <- synthetic_cdisc_data("latest")$adsl
          ADTTE <- synthetic_cdisc_data("latest")$adtte',
  check = TRUE
)
#> A CDISCTealData object containing 2 TealDataset/TealDatasetConnector object(s) as element(s):
#> --> Element 1:
#> A CDISCTealDataset object containing the following data.frame (400 rows and 56 columns):
#>   STUDYID               USUBJID SUBJID SITEID AGE  AGEU SEX
#> 1 AB12345  AB12345-CHN-3-id-128 id-128  CHN-3  32 YEARS   M
#> 2 AB12345 AB12345-CHN-15-id-262 id-262 CHN-15  35 YEARS   M
#> 3 AB12345  AB12345-RUS-3-id-378 id-378  RUS-3  30 YEARS   F
#> 4 AB12345 AB12345-CHN-11-id-220 id-220 CHN-11  26 YEARS   F
#> 5 AB12345  AB12345-CHN-7-id-267 id-267  CHN-7  40 YEARS   M
#> 6 AB12345 AB12345-CHN-15-id-201 id-201 CHN-15  49 YEARS   M
#>                        RACE                 ETHNIC COUNTRY DTHFL         INVID
#> 1                     ASIAN     HISPANIC OR LATINO     CHN     Y  INV ID CHN-3
#> 2 BLACK OR AFRICAN AMERICAN NOT HISPANIC OR LATINO     CHN     N INV ID CHN-15
#> 3                     ASIAN NOT HISPANIC OR LATINO     RUS     N  INV ID RUS-3
#> 4                     ASIAN NOT HISPANIC OR LATINO     CHN     N INV ID CHN-11
#> 5                     ASIAN NOT HISPANIC OR LATINO     CHN     N  INV ID CHN-7
#> 6                     ASIAN NOT HISPANIC OR LATINO     CHN     Y INV ID CHN-15
#>           INVNAM            ARM ARMCD         ACTARM ACTARMCD         TRT01P
#> 1  Dr. CHN-3 Doe      A: Drug X ARM A      A: Drug X    ARM A      A: Drug X
#> 2 Dr. CHN-15 Doe C: Combination ARM C C: Combination    ARM C C: Combination
#> 3  Dr. RUS-3 Doe C: Combination ARM C C: Combination    ARM C C: Combination
#> 4 Dr. CHN-11 Doe     B: Placebo ARM B     B: Placebo    ARM B     B: Placebo
#> 5  Dr. CHN-7 Doe     B: Placebo ARM B     B: Placebo    ARM B     B: Placebo
#> 6 Dr. CHN-15 Doe C: Combination ARM C C: Combination    ARM C C: Combination
#>           TRT01A         TRT02P         TRT02A REGION1 STRATA1 STRATA2
#> 1      A: Drug X     B: Placebo      A: Drug X    Asia       C      S2
#> 2 C: Combination     B: Placebo C: Combination    Asia       C      S1
#> 3 C: Combination      A: Drug X     B: Placebo Eurasia       A      S1
#> 4     B: Placebo     B: Placebo     B: Placebo    Asia       B      S2
#> 5     B: Placebo C: Combination      A: Drug X    Asia       C      S1
#> 6 C: Combination     B: Placebo C: Combination    Asia       C      S2
#>      BMRKR1 BMRKR2 ITTFL SAFFL BMEASIFL BEP01FL AEWITHFL     RANDDT
#> 1 14.424934 MEDIUM     Y     Y        Y       Y        N 2019-02-22
#> 2  4.055463    LOW     Y     Y        N       N        Y 2019-02-26
#> 3  2.803240   HIGH     Y     Y        Y       N        N 2019-02-24
#> 4 10.262734 MEDIUM     Y     Y        Y       Y        N 2019-02-27
#> 5  6.206763    LOW     Y     Y        N       N        N 2019-03-01
#> 6  6.906799 MEDIUM     Y     Y        Y       N        N 2019-03-05
#>               TRTSDTM             TRTEDTM           TRT01SDTM
#> 1 2019-02-24 11:09:18 2022-02-12 03:55:58 2019-02-24 11:09:18
#> 2 2019-02-26 09:05:00 2022-02-26 02:32:36 2019-02-26 09:05:00
#> 3 2019-02-28 03:19:08 2022-02-27 20:46:44 2019-02-28 03:19:08
#> 4 2019-03-01 13:33:03 2022-03-01 07:00:39 2019-03-01 13:33:03
#> 5 2019-03-02 00:09:16 2022-03-01 17:36:52 2019-03-02 00:09:16
#> 6 2019-03-05 15:23:44 2022-02-19 03:34:25 2019-03-05 15:23:44
#>             TRT01EDTM           TRT02SDTM           TRT02EDTM
#> 1 2021-02-11 22:06:46 2021-02-11 22:06:46 2022-02-12 03:55:58
#> 2 2021-02-25 20:43:24 2021-02-25 20:43:24 2022-02-26 02:32:36
#> 3 2021-02-27 14:57:32 2021-02-27 14:57:32 2022-02-27 20:46:44
#> 4 2021-03-01 01:11:27 2021-03-01 01:11:27 2022-03-01 07:00:39
#> 5 2021-03-01 11:47:40 2021-03-01 11:47:40 2022-03-01 17:36:52
#> 6 2021-02-18 21:45:13 2021-02-18 21:45:13 2022-02-19 03:34:25
#>              AP01SDTM            AP01EDTM            AP02SDTM
#> 1 2019-02-24 11:09:18 2021-02-11 22:06:46 2021-02-11 22:06:46
#> 2 2019-02-26 09:05:00 2021-02-25 20:43:24 2021-02-25 20:43:24
#> 3 2019-02-28 03:19:08 2021-02-27 14:57:32 2021-02-27 14:57:32
#> 4 2019-03-01 13:33:03 2021-03-01 01:11:27 2021-03-01 01:11:27
#> 5 2019-03-02 00:09:16 2021-03-01 11:47:40 2021-03-01 11:47:40
#> 6 2019-03-05 15:23:44 2021-02-18 21:45:13 2021-02-18 21:45:13
#>              AP02EDTM       EOSSTT       EOTSTT      EOSDT EOSDY DCSREAS
#> 1 2022-02-12 03:55:58 DISCONTINUED DISCONTINUED 2022-02-12  1084   DEATH
#> 2 2022-02-26 02:32:36    COMPLETED    COMPLETED 2022-02-26  1096    <NA>
#> 3 2022-02-27 20:46:44    COMPLETED    COMPLETED 2022-02-27  1096    <NA>
#> 4 2022-03-01 07:00:39    COMPLETED    COMPLETED 2022-03-01  1096    <NA>
#> 5 2022-03-01 17:36:52    COMPLETED    COMPLETED 2022-03-01  1096    <NA>
#> 6 2022-02-19 03:34:25 DISCONTINUED DISCONTINUED 2022-02-19  1082   DEATH
#>        DTHDT       DTHCAUS        DTHCAT LDDTHELD LDDTHGR1   LSTALVDT DTHADY
#> 1 2022-03-06 ADVERSE EVENT ADVERSE EVENT       22     <=30 2022-03-06   1106
#> 2       <NA>          <NA>          <NA>       NA     <NA> 2022-03-17     NA
#> 3       <NA>          <NA>          <NA>       NA     <NA> 2022-03-11     NA
#> 4       <NA>          <NA>          <NA>       NA     <NA> 2022-03-26     NA
#> 5       <NA>          <NA>          <NA>       NA     <NA> 2022-03-15     NA
#> 6 2022-02-22 ADVERSE EVENT ADVERSE EVENT        3     <=30 2022-02-22   1085
#>   ADTHAUT study_duration_secs
#> 1     Yes            63113904
#> 2    <NA>            63113904
#> 3    <NA>            63113904
#> 4    <NA>            63113904
#> 5    <NA>            63113904
#> 6     Yes            63113904
#> 
#> ...
#> # A tibble: 6 × 56
#>   STUDYID USUBJID     SUBJID SITEID   AGE AGEU  SEX   RACE  ETHNIC COUNTRY DTHFL
#>   <chr>   <chr>       <chr>  <chr>  <int> <fct> <fct> <fct> <fct>  <fct>   <fct>
#> 1 AB12345 AB12345-CH… id-11  CHN-9     28 YEARS F     NATI… HISPA… CHN     Y    
#> 2 AB12345 AB12345-CH… id-352 CHN-16    28 YEARS M     ASIAN UNKNO… CHN     N    
#> 3 AB12345 AB12345-CH… id-186 CHN-1     27 YEARS M     ASIAN NOT H… CHN     N    
#> 4 AB12345 AB12345-CH… id-371 CHN-1     28 YEARS F     ASIAN NOT H… CHN     N    
#> 5 AB12345 AB12345-CH… id-233 CHN-1     36 YEARS F     BLAC… NOT H… CHN     Y    
#> 6 AB12345 AB12345-US… id-131 USA-12    44 YEARS F     AMER… NOT H… USA     N    
#> # … with 45 more variables: INVID <chr>, INVNAM <chr>, ARM <fct>, ARMCD <fct>,
#> #   ACTARM <fct>, ACTARMCD <fct>, TRT01P <fct>, TRT01A <fct>, TRT02P <fct>,
#> #   TRT02A <fct>, REGION1 <fct>, STRATA1 <fct>, STRATA2 <fct>, BMRKR1 <dbl>,
#> #   BMRKR2 <fct>, ITTFL <fct>, SAFFL <fct>, BMEASIFL <fct>, BEP01FL <fct>,
#> #   AEWITHFL <fct>, RANDDT <date>, TRTSDTM <dttm>, TRTEDTM <dttm>,
#> #   TRT01SDTM <dttm>, TRT01EDTM <dttm>, TRT02SDTM <dttm>, TRT02EDTM <dttm>,
#> #   AP01SDTM <dttm>, AP01EDTM <dttm>, AP02SDTM <dttm>, AP02EDTM <dttm>, …
#> --> Element 2:
#> A CDISCTealDataset object containing the following data.frame (2000 rows and 68 columns):
#>   STUDYID              USUBJID SUBJID SITEID AGE  AGEU SEX
#> 1 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 2 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 3 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 4 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 5 AB12345 AB12345-BRA-1-id-105 id-105  BRA-1  38 YEARS   M
#> 6 AB12345 AB12345-BRA-1-id-134 id-134  BRA-1  47 YEARS   M
#>                        RACE                 ETHNIC COUNTRY DTHFL        INVID
#> 1 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 2 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 3 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 4 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 5 BLACK OR AFRICAN AMERICAN     HISPANIC OR LATINO     BRA     N INV ID BRA-1
#> 6                     WHITE NOT HISPANIC OR LATINO     BRA     Y INV ID BRA-1
#>          INVNAM       ARM ARMCD    ACTARM ACTARMCD    TRT01P    TRT01A
#> 1 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 2 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 3 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 4 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 5 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#> 6 Dr. BRA-1 Doe A: Drug X ARM A A: Drug X    ARM A A: Drug X A: Drug X
#>           TRT02P    TRT02A       REGION1 STRATA1 STRATA2   BMRKR1 BMRKR2 ITTFL
#> 1 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 2 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 3 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 4 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 5 C: Combination A: Drug X South America       B      S1 4.156914 MEDIUM     Y
#> 6     B: Placebo A: Drug X South America       B      S2 6.462991    LOW     Y
#>   SAFFL BMEASIFL BEP01FL AEWITHFL     RANDDT             TRTSDTM
#> 1     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 2     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 3     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 4     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 5     Y        Y       Y        N 2020-03-08 2020-03-08 05:28:11
#> 6     Y        Y       N        N 2020-11-03 2020-11-04 03:50:33
#>               TRTEDTM           TRT01SDTM           TRT01EDTM
#> 1 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 2 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 3 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 4 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 5 2022-02-14 20:26:11 2020-03-08 05:28:11 2021-02-14 14:36:59
#> 6 2022-02-20 03:01:31 2020-11-04 03:50:33 2021-02-19 21:12:19
#>             TRT02SDTM           TRT02EDTM            AP01SDTM
#> 1 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 2 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 3 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 4 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 5 2021-02-14 14:36:59 2022-02-14 20:26:11 2020-03-08 05:28:11
#> 6 2021-02-19 21:12:19 2022-02-20 03:01:31 2020-11-04 03:50:33
#>              AP01EDTM            AP02SDTM            AP02EDTM       EOSSTT
#> 1 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 2 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 3 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 4 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 5 2021-02-14 14:36:59 2021-02-14 14:36:59 2022-02-14 20:26:11 DISCONTINUED
#> 6 2021-02-19 21:12:19 2021-02-19 21:12:19 2022-02-20 03:01:31 DISCONTINUED
#>         EOTSTT      EOSDT EOSDY            DCSREAS      DTHDT       DTHCAUS
#> 1 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 2 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 3 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 4 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 5 DISCONTINUED 2022-02-14   709 PROTOCOL VIOLATION       <NA>          <NA>
#> 6 DISCONTINUED 2022-02-20   473              DEATH 2022-03-16 ADVERSE EVENT
#>          DTHCAT LDDTHELD LDDTHGR1   LSTALVDT DTHADY ADTHAUT study_duration_secs
#> 1          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 2          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 3          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 4          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 5          <NA>       NA     <NA> 2022-03-09     NA    <NA>            63113904
#> 6 ADVERSE EVENT       24     <=30 2022-03-16    497     Yes            63113904
#>   ASEQ TTESEQ                          PARAM PARAMCD      AVAL AVALU       ADTM
#> 1    2      2 Duration of Confirmed Response    CRSD 1273.8498  DAYS 2021-01-25
#> 2    4      4            Event Free Survival     EFS  135.9787  DAYS 2022-02-11
#> 3    3      3               Overall Survival      OS 1759.8678  DAYS 2021-07-16
#> 4    1      1      Progression Free Survival     PFS  241.1912  DAYS 2020-12-13
#> 5   NA     NA  Total Number of Exacerbations     TNE    1.0000 COUNT       <NA>
#> 6    4      4 Duration of Confirmed Response    CRSD  544.5728  DAYS 2021-06-22
#>   ADY CNSR                    EVNTDESC                   CNSDTDSC lgTMATRSK
#> 1 323    1 Last Date Known To Be Alive End of AE Reporting Period        NA
#> 2 705    0                       Death                                   NA
#> 3 495    0                       Death                                   NA
#> 4 280    0         Disease Progression                                   NA
#> 5  NA    1                        <NA> End of AE Reporting Period -2.802988
#> 6 230    0                       Death                                   NA
#> 
#> ...
#> # A tibble: 6 × 68
#>   STUDYID USUBJID     SUBJID SITEID   AGE AGEU  SEX   RACE  ETHNIC COUNTRY DTHFL
#>   <chr>   <chr>       <chr>  <chr>  <int> <fct> <fct> <fct> <fct>  <fct>   <fct>
#> 1 AB12345 AB12345-US… id-206 USA-8     34 YEARS F     ASIAN NOT H… USA     N    
#> 2 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> 3 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> 4 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> 5 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> 6 AB12345 AB12345-US… id-130 USA-9     40 YEARS M     ASIAN NOT H… USA     N    
#> # … with 57 more variables: INVID <chr>, INVNAM <chr>, ARM <fct>, ARMCD <fct>,
#> #   ACTARM <fct>, ACTARMCD <fct>, TRT01P <fct>, TRT01A <fct>, TRT02P <fct>,
#> #   TRT02A <fct>, REGION1 <fct>, STRATA1 <fct>, STRATA2 <fct>, BMRKR1 <dbl>,
#> #   BMRKR2 <fct>, ITTFL <fct>, SAFFL <fct>, BMEASIFL <fct>, BEP01FL <fct>,
#> #   AEWITHFL <fct>, RANDDT <date>, TRTSDTM <dttm>, TRTEDTM <dttm>,
#> #   TRT01SDTM <dttm>, TRT01EDTM <dttm>, TRT02SDTM <dttm>, TRT02EDTM <dttm>,
#> #   AP01SDTM <dttm>, AP01EDTM <dttm>, AP02SDTM <dttm>, AP02EDTM <dttm>, …