From 835ae58ac40ad202edda2eac3d39fd99473a290a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 30 May 2024 21:16:54 +0000 Subject: [PATCH] Built site for sdtm.oak: 0.0.0.9004@e1aa479 --- 404.html | 2 +- CODE_OF_CONDUCT.html | 2 +- CONTRIBUTING.html | 2 +- LICENSE.html | 2 +- articles/algorithms.html | 2 +- articles/index.html | 2 +- articles/iso_8601.html | 2 +- articles/study_sdtm_spec.html | 2 +- authors.html | 6 +- index.html | 2 +- news/index.html | 9 +- pkgdown.yml | 2 +- pull_request_template.html | 2 +- reference/add_problems.html | 2 +- reference/any_problems.html | 2 +- reference/assert_capture_matrix.html | 2 +- reference/assert_ct_clst.html | 2 +- reference/assert_ct_spec.html | 2 +- reference/assert_dtc_fmt.html | 2 +- reference/assert_dtc_format.html | 2 +- reference/assign.html | 2 +- reference/assign_datetime.html | 2 +- reference/clear_cache.html | 2 +- reference/coalesce_capture_matrices.html | 2 +- reference/complete_capture_matrix.html | 2 +- reference/contains_oak_id_vars.html | 2 +- reference/create_iso8601.html | 2 +- reference/ct_map.html | 2 +- reference/ct_mappings.html | 2 +- reference/ct_spec_example.html | 2 +- reference/ct_spec_vars.html | 2 +- reference/derive_seq.html | 198 +++++++++++++++++++++ reference/derive_study_day.html | 2 +- reference/domain_example.html | 212 +++++++++++++++++++++++ reference/dtc_formats.html | 2 +- reference/dttm_fmt_to_regex.html | 2 +- reference/find_int_gap.html | 2 +- reference/fmt_cmp.html | 2 +- reference/fmt_rg.html | 2 +- reference/format_iso8601.html | 2 +- reference/harcode.html | 2 +- reference/index.html | 44 ++++- reference/index_for_recode.html | 2 +- reference/is_seq_name.html | 114 ++++++++++++ reference/iso8601_mon.html | 2 +- reference/iso8601_na.html | 2 +- reference/iso8601_sec.html | 2 +- reference/iso8601_truncate.html | 2 +- reference/iso8601_two_digits.html | 2 +- reference/iso8601_year.html | 2 +- reference/months_abb_regex.html | 2 +- reference/oak_id_vars.html | 2 +- reference/parse_dttm.html | 2 +- reference/parse_dttm_fmt.html | 2 +- reference/problems.html | 2 +- reference/pseq.html | 2 +- reference/read_ct_spec.html | 2 +- reference/read_ct_spec_example.html | 2 +- reference/read_domain_example.html | 161 +++++++++++++++++ reference/recode.html | 2 +- reference/reg_matches.html | 2 +- reference/regex_or.html | 2 +- reference/sbj_vars.html | 101 +++++++++++ reference/sdtm.oak-package.html | 2 +- reference/sdtm_assign.html | 2 +- reference/sdtm_hardcode.html | 2 +- reference/str_to_anycase.html | 2 +- reference/yy_to_yyyy.html | 2 +- reference/zero_pad_whole_number.html | 2 +- search.json | 2 +- sitemap.xml | 15 ++ 71 files changed, 917 insertions(+), 67 deletions(-) create mode 100644 reference/derive_seq.html create mode 100644 reference/domain_example.html create mode 100644 reference/is_seq_name.html create mode 100644 reference/read_domain_example.html create mode 100644 reference/sbj_vars.html diff --git a/404.html b/404.html index d9e64720..80afc998 100644 --- a/404.html +++ b/404.html @@ -31,7 +31,7 @@ sdtm.oak - 0.0.0.9003 + 0.0.0.9004 + + + + + +
+
+
+ +
+

derive_seq() creates a new identifier variable: the sequence number +(--SEQ).

+

This function adds a newly derived variable to tgt_dat, namely the sequence +number (--SEQ) whose name is the one provided in tgt_var. An integer +sequence is generated that uniquely identifies each record within the domain.

+

Prior to the derivation of tgt_var, the data frame tgt_dat is sorted +according to grouping variables indicated in rec_vars.

+
+ +
+

Usage

+
derive_seq(
+  tgt_dat,
+  tgt_var,
+  rec_vars,
+  sbj_vars = sdtm.oak::sbj_vars(),
+  start_at = 1L
+)
+
+ +
+

Arguments

+
tgt_dat
+

The target dataset, a data frame.

+ + +
tgt_var
+

The target SDTM variable: a single string indicating the name +of the sequence number (--SEQ) variable, e.g. "DSSEQ". Note that +supplying a name not ending in "SEQ" will raise a warning.

+ + +
rec_vars
+

A character vector of record-level identifier variables.

+ + +
sbj_vars
+

A character vector of subject-level identifier variables.

+ + +
start_at
+

The sequence numbering starts at this value (default is 1).

+ +
+
+

Value

+ + +

Returns the data frame supplied in tgt_dat with the newly derived +variable, i.e. the sequence number (--SEQ), whose name is that passed in +tgt_var. This variable is of type integer.

+
+ +
+

Examples

+
# A VS raw data set example
+(vs <- read_domain_example("vs"))
+#> # A tibble: 6 × 7
+#>   STUDYID DOMAIN USUBJID    VSSPID                 VSTESTCD VSDTC       VSTPTNUM
+#>   <chr>   <chr>  <chr>      <chr>                  <chr>    <chr>          <dbl>
+#> 1 ABC123  VS     ABC123-375 /F:VTLS1-D:9795532-R:2 DIABP    2020-09-01…       NA
+#> 2 ABC123  VS     ABC123-375 /F:VTLS1-D:9795532-R:2 TEMP     2020-09-01…       NA
+#> 3 ABC123  VS     ABC123-375 /F:VTLS2-D:9795533-R:2 DIABP    2020-09-28…        2
+#> 4 ABC123  VS     ABC123-375 /F:VTLS2-D:9795533-R:2 TEMP     2020-09-28…        2
+#> 5 ABC123  VS     ABC123-376 /F:VTLS1-D:9795591-R:1 DIABP    2020-09-20        NA
+#> 6 ABC123  VS     ABC123-376 /F:VTLS1-D:9795591-R:1 TEMP     2020-09-20        NA
+
+# Derivation of VSSEQ
+rec_vars <- c("STUDYID", "USUBJID", "VSTESTCD", "VSDTC", "VSTPTNUM")
+derive_seq(tgt_dat = vs, tgt_var = "VSSEQ", rec_vars = rec_vars)
+#> # A tibble: 6 × 8
+#>   STUDYID DOMAIN USUBJID    VSSPID                 VSTESTCD VSDTC VSTPTNUM VSSEQ
+#>   <chr>   <chr>  <chr>      <chr>                  <chr>    <chr>    <dbl> <int>
+#> 1 ABC123  VS     ABC123-375 /F:VTLS1-D:9795532-R:2 DIABP    2020…       NA     1
+#> 2 ABC123  VS     ABC123-375 /F:VTLS2-D:9795533-R:2 DIABP    2020…        2     2
+#> 3 ABC123  VS     ABC123-375 /F:VTLS1-D:9795532-R:2 TEMP     2020…       NA     3
+#> 4 ABC123  VS     ABC123-375 /F:VTLS2-D:9795533-R:2 TEMP     2020…        2     4
+#> 5 ABC123  VS     ABC123-376 /F:VTLS1-D:9795591-R:1 DIABP    2020…       NA     1
+#> 6 ABC123  VS     ABC123-376 /F:VTLS1-D:9795591-R:1 TEMP     2020…       NA     2
+
+# An APSC raw data set example
+(apsc <- read_domain_example("apsc"))
+#> # A tibble: 6 × 6
+#>   STUDYID RSUBJID    SCTESTCD DOMAIN SREL    SCCAT         
+#>   <chr>   <chr>      <chr>    <chr>  <chr>   <chr>         
+#> 1 ABC123  ABC123-210 LVSBJIND APSC   FRIEND  CAREGIVERSTUDY
+#> 2 ABC123  ABC123-210 EDULEVEL APSC   FRIEND  CAREGIVERSTUDY
+#> 3 ABC123  ABC123-210 TMSPPT   APSC   FRIEND  CAREGIVERSTUDY
+#> 4 ABC123  ABC123-211 CAREDUR  APSC   SIBLING CAREGIVERSTUDY
+#> 5 ABC123  ABC123-211 LVSBJIND APSC   SIBLING CAREGIVERSTUDY
+#> 6 ABC123  ABC123-212 JOBCLAS  APSC   SPOUSE  CAREGIVERSTUDY
+
+# Derivation of APSEQ
+derive_seq(
+  tgt_dat = apsc,
+  tgt_var = "APSEQ",
+  rec_vars = c("STUDYID", "RSUBJID", "SCTESTCD"),
+  sbj_vars = c("STUDYID", "RSUBJID")
+)
+#> # A tibble: 6 × 7
+#>   STUDYID RSUBJID    SCTESTCD DOMAIN SREL    SCCAT          APSEQ
+#>   <chr>   <chr>      <chr>    <chr>  <chr>   <chr>          <int>
+#> 1 ABC123  ABC123-210 EDULEVEL APSC   FRIEND  CAREGIVERSTUDY     1
+#> 2 ABC123  ABC123-210 LVSBJIND APSC   FRIEND  CAREGIVERSTUDY     2
+#> 3 ABC123  ABC123-210 TMSPPT   APSC   FRIEND  CAREGIVERSTUDY     3
+#> 4 ABC123  ABC123-211 CAREDUR  APSC   SIBLING CAREGIVERSTUDY     1
+#> 5 ABC123  ABC123-211 LVSBJIND APSC   SIBLING CAREGIVERSTUDY     2
+#> 6 ABC123  ABC123-212 JOBCLAS  APSC   SPOUSE  CAREGIVERSTUDY     1
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/derive_study_day.html b/reference/derive_study_day.html index 6ee51eab..fadc9971 100644 --- a/reference/derive_study_day.html +++ b/reference/derive_study_day.html @@ -18,7 +18,7 @@ sdtm.oak - 0.0.0.9003 + 0.0.0.9004 + + + + + +
+
+
+ +
+

domain_example() resolves the local path to a SDTM domain example file. The +domain examples files were imported from +pharmaversesdtm. See +Details section for available datasets.

+
+ +
+

Usage

+
domain_example(example)
+
+ + +
+

Arguments

+
example
+

A string with either the basename, file name, or relative path +to a SDTM domain example file bundled with {stdm.oak}, e.g. "cm" +(Concomitant Medication) or "ae" (Adverse Events).

+ +
+
+

Value

+ + +

The local path to an example file if example is supplied, or a +character vector of example file names.

+
+
+

Details

+

Datasets were obtained from +pharmaversesdtm but are +originally sourced from the CDISC pilot project or have been +constructed ad-hoc by the +admiral team. These datasets +are bundled with {sdtm.oak}, thus obviating a dependence on +{pharmaversesdtm}.

+

Example SDTM domains

+ + +
"ae_ophtha"
+

Ophthalmology Adverse Events Dataset.

+ +
"ae"
+

Adverse Events Dataset-updated.

+ +
"ce_vaccine"
+

Clinical Events Dataset for Vaccine Studies.

+ +
"cm"
+

Concomitant Medication Dataset.

+ +
"dm_vaccine"
+

Demographics Dataset for Vaccine Studies.

+ +
"dm"
+

Demography Dataset.

+ +
"ds"
+

Disposition Dataset-updated.

+ +
"eg"
+

Electrocardiogram Dataset.

+ +
"ex_ophtha"
+

Ophthalmology Exposure Dataset.

+ +
"ex_vaccine"
+

Exposures Dataset for Vaccine Studies.

+ +
"ex"
+

Exposure Dataset.

+ +
"face_vaccine"
+

Findings About Clinical Events Dataset for Vaccine Studies.

+ +
"is_vaccine"
+

Immunogenicity Specimen Assessments Dataset for Vaccine Studies.

+ +
"lb"
+

Laboratory Measurements Dataset.

+ +
"mh"
+

Medical History Dataset-updated.

+ +
"oe_ophtha"
+

Ophthalmology Adverse Events Dataset.

+ +
"pc"
+

Pharmacokinetics Concentrations Dataset.

+ +
"pp"
+

Pharmacokinetics Parameters Dataset.

+ +
"qs_ophtha"
+

Ophthalmology Questionnaire Dataset.

+ +
"rs_onco_irecist"
+

Disease Response Dataset (iRECIST).

+ +
"rs_onco"
+

Disease Response Dataset.

+ + +
+ +
+
+

See also

+ +
+ +
+

Examples

+
# If no example is provided it returns a vector of possible choices.
+domain_example()
+#> [1] "ae"   "apsc" "cm"   "vs"  
+
+# Get the local path to the Concomitant Medication dataset file.
+domain_example("cm")
+#> [1] "/renv/lib/R-4.3/x86_64-pc-linux-gnu/sdtm.oak/domain/cm.rds"
+
+# Local path to the Adverse Events dataset file.
+domain_example("ae")
+#> [1] "/renv/lib/R-4.3/x86_64-pc-linux-gnu/sdtm.oak/domain/ae.rds"
+
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/dtc_formats.html b/reference/dtc_formats.html index 02b5c610..76f9a231 100644 --- a/reference/dtc_formats.html +++ b/reference/dtc_formats.html @@ -10,7 +10,7 @@ sdtm.oak - 0.0.0.9003 + 0.0.0.9004 + + + + + +
+
+
+ +
+

is_seq_name() returns which variable names end in "SEQ".

+
+ +
+

Usage

+
is_seq_name(x)
+
+ +
+

Arguments

+
x
+

A character vector.

+ +
+
+

Value

+ + +

A logical vector.

+
+ +
+

Examples

+
# A valid SEQ name.
+sdtm.oak:::is_seq_name("AESEQ")
+#> [1] TRUE
+
+# Not valid sequence number (`--SEQ`) variable names.
+# Case matters.
+sdtm.oak:::is_seq_name("AEseq")
+#> [1] FALSE
+
+# A valid name has to end in "SEQ".
+sdtm.oak:::is_seq_name("AESEQUENCE")
+#> [1] FALSE
+
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/iso8601_mon.html b/reference/iso8601_mon.html index 269946cd..46c268e7 100644 --- a/reference/iso8601_mon.html +++ b/reference/iso8601_mon.html @@ -12,7 +12,7 @@ sdtm.oak - 0.0.0.9003 + 0.0.0.9004 + + + + + +
+
+
+ +
+

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>
+
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/recode.html b/reference/recode.html index 509c94fb..44871bf8 100644 --- a/reference/recode.html +++ b/reference/recode.html @@ -12,7 +12,7 @@ sdtm.oak - 0.0.0.9003 + 0.0.0.9004 + + + + + +
+
+
+ +
+

sbj_vars() returns the set of variable names that uniquely define +a subject.

+
+ +
+

Usage

+
sbj_vars()
+
+ +
+

Value

+ + +

A character vector of variable names.

+
+ +
+

Examples

+
sbj_vars()
+#> [1] "STUDYID" "USUBJID"
+
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/sdtm.oak-package.html b/reference/sdtm.oak-package.html index d17316f9..132c0e56 100644 --- a/reference/sdtm.oak-package.html +++ b/reference/sdtm.oak-package.html @@ -10,7 +10,7 @@ sdtm.oak - 0.0.0.9003 + 0.0.0.9004