Skip to contents

read_domain_example() imports one of the bundled SDTM domain examples as a tibble into R. See domain_example() for possible choices.

Usage

read_domain_example(example)

Arguments

example

The name of SDTM domain example, e.g. "cm" (Concomitant Medication) or "ae" (Adverse Events). Run read_domain_example() for available example files.

Value

A tibble with an SDTM domain dataset, or a character vector of example file names.

See also

Examples

# Leave the `example` parameter as missing for available example files.
read_domain_example()
#> [1] "ae"   "apsc" "cm"   "vs"  

# Read the example Concomitant Medication domain.
read_domain_example("cm")
#> # A tibble: 7,510 × 21
#>    STUDYID DOMAIN USUBJID CMSEQ CMSPID CMTRT CMDECOD CMINDC CMCLAS CMDOSE CMDOSU
#>    <chr>   <chr>  <chr>   <dbl> <chr>  <chr> <chr>   <chr>  <chr>   <dbl> <chr> 
#>  1 CDISCP… CM     01-701…     1 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#>  2 CDISCP… CM     01-701…     5 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#>  3 CDISCP… CM     01-701…     9 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#>  4 CDISCP… CM     01-701…    13 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#>  5 CDISCP… CM     01-701…    18 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#>  6 CDISCP… CM     01-701…    23 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#>  7 CDISCP… CM     01-701…    28 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#>  8 CDISCP… CM     01-701…    33 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#>  9 CDISCP… CM     01-701…    38 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#> 10 CDISCP… CM     01-701…    43 1      ASPI… ACETYL… NA     NERVO…      1 TABLET
#> # ℹ 7,500 more rows
#> # ℹ 10 more variables: CMDOSFRQ <chr>, CMROUTE <chr>, VISITNUM <dbl>,
#> #   VISIT <chr>, VISITDY <dbl>, CMDTC <chr>, CMSTDTC <chr>, CMENDTC <chr>,
#> #   CMSTDY <dbl>, CMENDY <dbl>

# Read the example Adverse Events domain.
read_domain_example("ae")
#> # A tibble: 1,191 × 35
#>    STUDYID DOMAIN USUBJID AESEQ AESPID AETERM AELLT AELLTCD AEDECOD AEPTCD AEHLT
#>    <chr>   <chr>  <chr>   <dbl> <chr>  <chr>  <chr>   <dbl> <chr>    <dbl> <chr>
#>  1 CDISCP… AE     01-701…     1 E07    APPLI… APPL…      NA APPLIC…     NA HLT_…
#>  2 CDISCP… AE     01-701…     2 E08    APPLI… APPL…      NA APPLIC…     NA HLT_…
#>  3 CDISCP… AE     01-701…     3 E06    DIARR… DIAR…      NA DIARRH…     NA HLT_…
#>  4 CDISCP… AE     01-701…     3 E10    ATRIO… AV B…      NA ATRIOV…     NA HLT_…
#>  5 CDISCP… AE     01-701…     1 E08    ERYTH… ERYT…      NA ERYTHE…     NA HLT_…
#>  6 CDISCP… AE     01-701…     2 E09    ERYTH… LOCA…      NA ERYTHE…     NA HLT_…
#>  7 CDISCP… AE     01-701…     4 E08    ERYTH… ERYT…      NA ERYTHE…     NA HLT_…
#>  8 CDISCP… AE     01-701…     1 E04    APPLI… APPL…      NA APPLIC…     NA HLT_…
#>  9 CDISCP… AE     01-701…     2 E05    APPLI… APPL…      NA APPLIC…     NA HLT_…
#> 10 CDISCP… AE     01-701…     1 E08    APPLI… APPL…      NA APPLIC…     NA HLT_…
#> # ℹ 1,181 more rows
#> # ℹ 24 more variables: AEHLTCD <dbl>, AEHLGT <chr>, AEHLGTCD <dbl>,
#> #   AEBODSYS <chr>, AEBDSYCD <dbl>, AESOC <chr>, AESOCCD <dbl>, AESEV <chr>,
#> #   AESER <chr>, AEACN <chr>, AEREL <chr>, AEOUT <chr>, AESCAN <chr>,
#> #   AESCONG <chr>, AESDISAB <chr>, AESDTH <chr>, AESHOSP <chr>, AESLIFE <chr>,
#> #   AESOD <chr>, AEDTC <chr>, AESTDTC <chr>, AEENDTC <chr>, AESTDY <dbl>,
#> #   AEENDY <dbl>