Straub B, Bundfuss S, Dickinson J, Farrugia R, Gautier F, Gayatri G, Chakma A, Kulkarni D, Mancini E, Mascary S, Miller G, Patil L, Rothstein J, Shapcott S, Simms E, Sjoberg D, Thoma S, Webster P, Zhang K, Zhu Z (2024).
admiral: ADaM in R Asset Library.
-R package version 1.1.1.9045,
+R package version 1.1.1.9046,
https://github.com/pharmaverse/admiral, https://pharmaverse.github.io/admiral/.
@Manual{,
title = {admiral: ADaM in R Asset Library},
author = {Ben Straub and Stefan Bundfuss and Jeffrey Dickinson and Ross Farrugia and Fanny Gautier and G Gayatri and Asha Chakma and Dinakar Kulkarni and Edoardo Mancini and Sadchla Mascary and Gordon Miller and Lina Patil and Jim Rothstein and Sophie Shapcott and Eric Simms and Daniel Sjoberg and Stefan Thoma and Phillip Webster and Kangjie Zhang and Zelos Zhu},
year = {2024},
- note = {R package version 1.1.1.9045,
+ note = {R package version 1.1.1.9046,
https://github.com/pharmaverse/admiral},
url = {https://pharmaverse.github.io/admiral/},
}
convert_date_to_dtm("2019-07-18T15:25:00")#> [1] "2019-07-18 15:25:00 UTC"convert_date_to_dtm(Sys.time())
-#> [1] "2024-12-20 19:57:32 UTC"
+#> [1] "2024-12-22 21:46:00 UTC"convert_date_to_dtm(as.Date("2019-07-18"), time_imputation ="23:59:59")#> [1] "2019-07-18 23:59:59 UTC"convert_date_to_dtm("2019-07-18", time_imputation ="23:59:59")
diff --git a/dev/reference/convert_dtc_to_dt.html b/dev/reference/convert_dtc_to_dt.html
index 2a89e8d9ab..3dc9f627c7 100644
--- a/dev/reference/convert_dtc_to_dt.html
+++ b/dev/reference/convert_dtc_to_dt.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/convert_dtc_to_dtm.html b/dev/reference/convert_dtc_to_dtm.html
index 5ec1c1a887..794424216e 100644
--- a/dev/reference/convert_dtc_to_dtm.html
+++ b/dev/reference/convert_dtc_to_dtm.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/convert_na_to_blanks.html b/dev/reference/convert_na_to_blanks.html
index 0ee9d4bbdc..6ffc80018f 100644
--- a/dev/reference/convert_na_to_blanks.html
+++ b/dev/reference/convert_na_to_blanks.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/count_vals.html b/dev/reference/count_vals.html
index 7217123d68..3704bbc1f4 100644
--- a/dev/reference/count_vals.html
+++ b/dev/reference/count_vals.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/country_code_lookup.html b/dev/reference/country_code_lookup.html
index cdff79978c..3d7f80750c 100644
--- a/dev/reference/country_code_lookup.html
+++ b/dev/reference/country_code_lookup.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/create_period_dataset.html b/dev/reference/create_period_dataset.html
index a72e9e654b..cc7fcfdfae 100644
--- a/dev/reference/create_period_dataset.html
+++ b/dev/reference/create_period_dataset.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/create_query_data.html b/dev/reference/create_query_data.html
index db35e5ecc2..6c46b95baa 100644
--- a/dev/reference/create_query_data.html
+++ b/dev/reference/create_query_data.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/create_single_dose_dataset.html b/dev/reference/create_single_dose_dataset.html
index 45ad4782b1..ccba693e1e 100644
--- a/dev/reference/create_single_dose_dataset.html
+++ b/dev/reference/create_single_dose_dataset.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/date_source.html b/dev/reference/date_source.html
index 1cfa9967a4..72e274b684 100644
--- a/dev/reference/date_source.html
+++ b/dev/reference/date_source.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/default_qtc_paramcd.html b/dev/reference/default_qtc_paramcd.html
index cccbcf8250..254de2007f 100644
--- a/dev/reference/default_qtc_paramcd.html
+++ b/dev/reference/default_qtc_paramcd.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derivation_slice.html b/dev/reference/derivation_slice.html
index 3fcfd98137..57024576ef 100644
--- a/dev/reference/derivation_slice.html
+++ b/dev/reference/derivation_slice.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_basetype_records.html b/dev/reference/derive_basetype_records.html
index 11b72d064e..49cbad1a59 100644
--- a/dev/reference/derive_basetype_records.html
+++ b/dev/reference/derive_basetype_records.html
@@ -1,19 +1,19 @@
Derive Basetype Variable — derive_basetype_records • admiral
+given parameter, if Baseline Value BASE or BASEC are derived and there
+is more than one definition of baseline, then BASETYPE must be non-null on
+all records of any type for that parameter. Each value of BASETYPE refers
+to a definition of baseline that characterizes the value of BASE on that
+row. Please see section 4.2.1.6 of the ADaM Implementation Guide, version
+1.3 for further background.">
Skip to contents
@@ -21,7 +21,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
@@ -84,12 +84,12 @@
Baseline Type BASETYPE is needed when there is more than one definition of
baseline for a given Analysis Parameter PARAM in the same dataset. For a
-given parameter, if Baseline Value BASE is populated, and there is more than
-one definition of baseline, then BASETYPE must be non-null on all records of
-any type for that parameter. Each value of BASETYPE refers to a definition of
-baseline that characterizes the value of BASE on that row. Please see
-section 4.2.1.6 of the ADaM Implementation Guide, version 1.3 for further
-background.
+given parameter, if Baseline Value BASE or BASEC are derived and there
+is more than one definition of baseline, then BASETYPE must be non-null on
+all records of any type for that parameter. Each value of BASETYPE refers
+to a definition of baseline that characterizes the value of BASE on that
+row. Please see section 4.2.1.6 of the ADaM Implementation Guide, version
+1.3 for further background.
diff --git a/dev/reference/derive_expected_records.html b/dev/reference/derive_expected_records.html
index d952f37262..3b6b33614a 100644
--- a/dev/reference/derive_expected_records.html
+++ b/dev/reference/derive_expected_records.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_extreme_event.html b/dev/reference/derive_extreme_event.html
index ac6a05514e..f478f24737 100644
--- a/dev/reference/derive_extreme_event.html
+++ b/dev/reference/derive_extreme_event.html
@@ -17,7 +17,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_extreme_records.html b/dev/reference/derive_extreme_records.html
index 5f9446dbee..f61748d1d7 100644
--- a/dev/reference/derive_extreme_records.html
+++ b/dev/reference/derive_extreme_records.html
@@ -17,7 +17,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_locf_records.html b/dev/reference/derive_locf_records.html
index 62742b465b..8832f11cce 100644
--- a/dev/reference/derive_locf_records.html
+++ b/dev/reference/derive_locf_records.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_bmi.html b/dev/reference/derive_param_bmi.html
index a9907bf886..fcf762e7b6 100644
--- a/dev/reference/derive_param_bmi.html
+++ b/dev/reference/derive_param_bmi.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_bsa.html b/dev/reference/derive_param_bsa.html
index 14e2df6713..20ef658eac 100644
--- a/dev/reference/derive_param_bsa.html
+++ b/dev/reference/derive_param_bsa.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_computed.html b/dev/reference/derive_param_computed.html
index 8ab7bab349..135847bcc7 100644
--- a/dev/reference/derive_param_computed.html
+++ b/dev/reference/derive_param_computed.html
@@ -23,7 +23,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_doseint.html b/dev/reference/derive_param_doseint.html
index c972feed37..a3341f76d1 100644
--- a/dev/reference/derive_param_doseint.html
+++ b/dev/reference/derive_param_doseint.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_exist_flag.html b/dev/reference/derive_param_exist_flag.html
index 83f713ef53..474e6c1ffe 100644
--- a/dev/reference/derive_param_exist_flag.html
+++ b/dev/reference/derive_param_exist_flag.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_exposure.html b/dev/reference/derive_param_exposure.html
index 1c47eaa642..534d1eee92 100644
--- a/dev/reference/derive_param_exposure.html
+++ b/dev/reference/derive_param_exposure.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_extreme_record.html b/dev/reference/derive_param_extreme_record.html
index 28205f7627..060c2e0cd6 100644
--- a/dev/reference/derive_param_extreme_record.html
+++ b/dev/reference/derive_param_extreme_record.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_framingham.html b/dev/reference/derive_param_framingham.html
index 07f635b4ca..f0e4ccb36a 100644
--- a/dev/reference/derive_param_framingham.html
+++ b/dev/reference/derive_param_framingham.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_map.html b/dev/reference/derive_param_map.html
index bd0d46ce04..9957a4a877 100644
--- a/dev/reference/derive_param_map.html
+++ b/dev/reference/derive_param_map.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_qtc.html b/dev/reference/derive_param_qtc.html
index a42972c249..42a2901998 100644
--- a/dev/reference/derive_param_qtc.html
+++ b/dev/reference/derive_param_qtc.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_rr.html b/dev/reference/derive_param_rr.html
index 885730c591..05c7fb2e52 100644
--- a/dev/reference/derive_param_rr.html
+++ b/dev/reference/derive_param_rr.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_tte.html b/dev/reference/derive_param_tte.html
index e76decd59c..17b295d583 100644
--- a/dev/reference/derive_param_tte.html
+++ b/dev/reference/derive_param_tte.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_param_wbc_abs.html b/dev/reference/derive_param_wbc_abs.html
index ee9e369d32..4398afb10d 100644
--- a/dev/reference/derive_param_wbc_abs.html
+++ b/dev/reference/derive_param_wbc_abs.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_summary_records.html b/dev/reference/derive_summary_records.html
index 3b35bd348b..d5ba8ad645 100644
--- a/dev/reference/derive_summary_records.html
+++ b/dev/reference/derive_summary_records.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_age_years.html b/dev/reference/derive_var_age_years.html
index 9e35a33cb4..43e77f097c 100644
--- a/dev/reference/derive_var_age_years.html
+++ b/dev/reference/derive_var_age_years.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_analysis_ratio.html b/dev/reference/derive_var_analysis_ratio.html
index 470acc6f4f..fb7519fcff 100644
--- a/dev/reference/derive_var_analysis_ratio.html
+++ b/dev/reference/derive_var_analysis_ratio.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_anrind.html b/dev/reference/derive_var_anrind.html
index c7b9edff4c..6765add731 100644
--- a/dev/reference/derive_var_anrind.html
+++ b/dev/reference/derive_var_anrind.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_atoxgr.html b/dev/reference/derive_var_atoxgr.html
index f511db78a0..fe0aa227ee 100644
--- a/dev/reference/derive_var_atoxgr.html
+++ b/dev/reference/derive_var_atoxgr.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_atoxgr_dir.html b/dev/reference/derive_var_atoxgr_dir.html
index 5b14810778..609411041f 100644
--- a/dev/reference/derive_var_atoxgr_dir.html
+++ b/dev/reference/derive_var_atoxgr_dir.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_base.html b/dev/reference/derive_var_base.html
index c9eabe740f..43fbccf175 100644
--- a/dev/reference/derive_var_base.html
+++ b/dev/reference/derive_var_base.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_chg.html b/dev/reference/derive_var_chg.html
index c8a2d928d7..78664757f3 100644
--- a/dev/reference/derive_var_chg.html
+++ b/dev/reference/derive_var_chg.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_dthcaus.html b/dev/reference/derive_var_dthcaus.html
index 686e13983c..214e216123 100644
--- a/dev/reference/derive_var_dthcaus.html
+++ b/dev/reference/derive_var_dthcaus.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_extreme_dt.html b/dev/reference/derive_var_extreme_dt.html
index 38207b21b9..3611057e0a 100644
--- a/dev/reference/derive_var_extreme_dt.html
+++ b/dev/reference/derive_var_extreme_dt.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_extreme_dtm.html b/dev/reference/derive_var_extreme_dtm.html
index a047fefa64..2eb425c95a 100644
--- a/dev/reference/derive_var_extreme_dtm.html
+++ b/dev/reference/derive_var_extreme_dtm.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_extreme_flag.html b/dev/reference/derive_var_extreme_flag.html
index 309b6bb4c2..e05180fd74 100644
--- a/dev/reference/derive_var_extreme_flag.html
+++ b/dev/reference/derive_var_extreme_flag.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_joined_exist_flag.html b/dev/reference/derive_var_joined_exist_flag.html
index 3b582ba8b5..19e2627bcf 100644
--- a/dev/reference/derive_var_joined_exist_flag.html
+++ b/dev/reference/derive_var_joined_exist_flag.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_merged_ef_msrc.html b/dev/reference/derive_var_merged_ef_msrc.html
index 7511bcb1dc..1b3744fea6 100644
--- a/dev/reference/derive_var_merged_ef_msrc.html
+++ b/dev/reference/derive_var_merged_ef_msrc.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_merged_exist_flag.html b/dev/reference/derive_var_merged_exist_flag.html
index 86360a969c..df101a76d4 100644
--- a/dev/reference/derive_var_merged_exist_flag.html
+++ b/dev/reference/derive_var_merged_exist_flag.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_merged_summary.html b/dev/reference/derive_var_merged_summary.html
index 11ddef05ee..c16f10345b 100644
--- a/dev/reference/derive_var_merged_summary.html
+++ b/dev/reference/derive_var_merged_summary.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_obs_number.html b/dev/reference/derive_var_obs_number.html
index 2777e2393a..66eb1d12c0 100644
--- a/dev/reference/derive_var_obs_number.html
+++ b/dev/reference/derive_var_obs_number.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_ontrtfl.html b/dev/reference/derive_var_ontrtfl.html
index 9e65f6debd..e7fbd784a2 100644
--- a/dev/reference/derive_var_ontrtfl.html
+++ b/dev/reference/derive_var_ontrtfl.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_pchg.html b/dev/reference/derive_var_pchg.html
index 21e584542a..f5223c441c 100644
--- a/dev/reference/derive_var_pchg.html
+++ b/dev/reference/derive_var_pchg.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_relative_flag.html b/dev/reference/derive_var_relative_flag.html
index 59dc1dbfc4..b9107df1a0 100644
--- a/dev/reference/derive_var_relative_flag.html
+++ b/dev/reference/derive_var_relative_flag.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_shift.html b/dev/reference/derive_var_shift.html
index db02d0e8af..b32aa1fe42 100644
--- a/dev/reference/derive_var_shift.html
+++ b/dev/reference/derive_var_shift.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_trtdurd.html b/dev/reference/derive_var_trtdurd.html
index d6928e5ed2..c0e0f79435 100644
--- a/dev/reference/derive_var_trtdurd.html
+++ b/dev/reference/derive_var_trtdurd.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_var_trtemfl.html b/dev/reference/derive_var_trtemfl.html
index 177e051b84..f345edaebe 100644
--- a/dev/reference/derive_var_trtemfl.html
+++ b/dev/reference/derive_var_trtemfl.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_aage.html b/dev/reference/derive_vars_aage.html
index c96d777078..182880c274 100644
--- a/dev/reference/derive_vars_aage.html
+++ b/dev/reference/derive_vars_aage.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_atc.html b/dev/reference/derive_vars_atc.html
index 60206b6bb1..d7a55b3497 100644
--- a/dev/reference/derive_vars_atc.html
+++ b/dev/reference/derive_vars_atc.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_cat.html b/dev/reference/derive_vars_cat.html
index 06e6e37dde..3f19b501dc 100644
--- a/dev/reference/derive_vars_cat.html
+++ b/dev/reference/derive_vars_cat.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_computed.html b/dev/reference/derive_vars_computed.html
index 7da899c751..b9181f7d94 100644
--- a/dev/reference/derive_vars_computed.html
+++ b/dev/reference/derive_vars_computed.html
@@ -23,7 +23,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_crit_flag.html b/dev/reference/derive_vars_crit_flag.html
index e1774d28d1..76385f9598 100644
--- a/dev/reference/derive_vars_crit_flag.html
+++ b/dev/reference/derive_vars_crit_flag.html
@@ -37,7 +37,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_dt.html b/dev/reference/derive_vars_dt.html
index ace29537c5..6c772b2384 100644
--- a/dev/reference/derive_vars_dt.html
+++ b/dev/reference/derive_vars_dt.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_dtm.html b/dev/reference/derive_vars_dtm.html
index 32abaab4ca..87996bd371 100644
--- a/dev/reference/derive_vars_dtm.html
+++ b/dev/reference/derive_vars_dtm.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_dtm_to_dt.html b/dev/reference/derive_vars_dtm_to_dt.html
index dd2db818d5..4ef183523f 100644
--- a/dev/reference/derive_vars_dtm_to_dt.html
+++ b/dev/reference/derive_vars_dtm_to_dt.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_dtm_to_tm.html b/dev/reference/derive_vars_dtm_to_tm.html
index 582cd17496..fb902b610c 100644
--- a/dev/reference/derive_vars_dtm_to_tm.html
+++ b/dev/reference/derive_vars_dtm_to_tm.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_duration.html b/dev/reference/derive_vars_duration.html
index 4a440810d8..ac03b00ea3 100644
--- a/dev/reference/derive_vars_duration.html
+++ b/dev/reference/derive_vars_duration.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_dy.html b/dev/reference/derive_vars_dy.html
index f2d67d6931..ae50b07997 100644
--- a/dev/reference/derive_vars_dy.html
+++ b/dev/reference/derive_vars_dy.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_extreme_event.html b/dev/reference/derive_vars_extreme_event.html
index eefd5d2aa3..a2f9fd2fbc 100644
--- a/dev/reference/derive_vars_extreme_event.html
+++ b/dev/reference/derive_vars_extreme_event.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_joined.html b/dev/reference/derive_vars_joined.html
index 54a5308c4c..22894af122 100644
--- a/dev/reference/derive_vars_joined.html
+++ b/dev/reference/derive_vars_joined.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_merged.html b/dev/reference/derive_vars_merged.html
index cab7fe57ec..760d914450 100644
--- a/dev/reference/derive_vars_merged.html
+++ b/dev/reference/derive_vars_merged.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_merged_lookup.html b/dev/reference/derive_vars_merged_lookup.html
index 3e4172a838..333a8384cd 100644
--- a/dev/reference/derive_vars_merged_lookup.html
+++ b/dev/reference/derive_vars_merged_lookup.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_period.html b/dev/reference/derive_vars_period.html
index 06f46efa5b..8c1191dafc 100644
--- a/dev/reference/derive_vars_period.html
+++ b/dev/reference/derive_vars_period.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_query.html b/dev/reference/derive_vars_query.html
index 460223e515..cb65cca152 100644
--- a/dev/reference/derive_vars_query.html
+++ b/dev/reference/derive_vars_query.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/derive_vars_transposed.html b/dev/reference/derive_vars_transposed.html
index fd920765f4..5fd23ccc05 100644
--- a/dev/reference/derive_vars_transposed.html
+++ b/dev/reference/derive_vars_transposed.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/dose_freq_lookup.html b/dev/reference/dose_freq_lookup.html
index a28b00d728..c748aedc39 100644
--- a/dev/reference/dose_freq_lookup.html
+++ b/dev/reference/dose_freq_lookup.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/dt_level.html b/dev/reference/dt_level.html
index 6b750d64fa..9597ed84f5 100644
--- a/dev/reference/dt_level.html
+++ b/dev/reference/dt_level.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/dthcaus_source.html b/dev/reference/dthcaus_source.html
index 1457e38066..4ed15ff63a 100644
--- a/dev/reference/dthcaus_source.html
+++ b/dev/reference/dthcaus_source.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/dtm_level.html b/dev/reference/dtm_level.html
index 497d88eca4..0109e6f441 100644
--- a/dev/reference/dtm_level.html
+++ b/dev/reference/dtm_level.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/event.html b/dev/reference/event.html
index 451ade7f2f..ea06facbe4 100644
--- a/dev/reference/event.html
+++ b/dev/reference/event.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/event_joined.html b/dev/reference/event_joined.html
index ec77320bd9..b14bdeef6b 100644
--- a/dev/reference/event_joined.html
+++ b/dev/reference/event_joined.html
@@ -21,7 +21,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/event_source.html b/dev/reference/event_source.html
index ce5554047b..ff9072f575 100644
--- a/dev/reference/event_source.html
+++ b/dev/reference/event_source.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/ex_single.html b/dev/reference/ex_single.html
index 3db995f335..bce718f102 100644
--- a/dev/reference/ex_single.html
+++ b/dev/reference/ex_single.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/example_qs.html b/dev/reference/example_qs.html
index f901c8c867..453af6bb02 100644
--- a/dev/reference/example_qs.html
+++ b/dev/reference/example_qs.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/extend_condition.html b/dev/reference/extend_condition.html
index 7f45147499..2a6bd6b365 100644
--- a/dev/reference/extend_condition.html
+++ b/dev/reference/extend_condition.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/extract_duplicate_records.html b/dev/reference/extract_duplicate_records.html
index 2a504b0a98..28da24d5c3 100644
--- a/dev/reference/extract_duplicate_records.html
+++ b/dev/reference/extract_duplicate_records.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/extract_unit.html b/dev/reference/extract_unit.html
index 660e793ba0..082a7ad16a 100644
--- a/dev/reference/extract_unit.html
+++ b/dev/reference/extract_unit.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/filter_exist.html b/dev/reference/filter_exist.html
index d6da09a9e1..a28d4e5d71 100644
--- a/dev/reference/filter_exist.html
+++ b/dev/reference/filter_exist.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/filter_extreme.html b/dev/reference/filter_extreme.html
index 96a6805461..edb3df3e87 100644
--- a/dev/reference/filter_extreme.html
+++ b/dev/reference/filter_extreme.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/filter_joined.html b/dev/reference/filter_joined.html
index 4628c034dd..6becd18e64 100644
--- a/dev/reference/filter_joined.html
+++ b/dev/reference/filter_joined.html
@@ -25,7 +25,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/filter_not_exist.html b/dev/reference/filter_not_exist.html
index 9a63ad90cd..9b76259240 100644
--- a/dev/reference/filter_not_exist.html
+++ b/dev/reference/filter_not_exist.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/filter_relative.html b/dev/reference/filter_relative.html
index e2950c9ee9..ed5e5c8805 100644
--- a/dev/reference/filter_relative.html
+++ b/dev/reference/filter_relative.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/flag_event.html b/dev/reference/flag_event.html
index bf270686f0..4ad697673e 100644
--- a/dev/reference/flag_event.html
+++ b/dev/reference/flag_event.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/format.basket_select.html b/dev/reference/format.basket_select.html
index 9612f005cc..7e639a4f82 100644
--- a/dev/reference/format.basket_select.html
+++ b/dev/reference/format.basket_select.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_admiral_option.html b/dev/reference/get_admiral_option.html
index f2bbd3d38f..8d3b30cf53 100644
--- a/dev/reference/get_admiral_option.html
+++ b/dev/reference/get_admiral_option.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_duplicates_dataset.html b/dev/reference/get_duplicates_dataset.html
index d2b4621775..be415d1dac 100644
--- a/dev/reference/get_duplicates_dataset.html
+++ b/dev/reference/get_duplicates_dataset.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_flagged_records.html b/dev/reference/get_flagged_records.html
index d70c5530ec..3a0859bf5b 100644
--- a/dev/reference/get_flagged_records.html
+++ b/dev/reference/get_flagged_records.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_hori_data.html b/dev/reference/get_hori_data.html
index 59a36f550a..f7a542aed2 100644
--- a/dev/reference/get_hori_data.html
+++ b/dev/reference/get_hori_data.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_imputation_target_date.html b/dev/reference/get_imputation_target_date.html
index ec7b450cdc..91be5d49e5 100644
--- a/dev/reference/get_imputation_target_date.html
+++ b/dev/reference/get_imputation_target_date.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_imputation_target_time.html b/dev/reference/get_imputation_target_time.html
index 31e02915fc..d03ed4f725 100644
--- a/dev/reference/get_imputation_target_time.html
+++ b/dev/reference/get_imputation_target_time.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_joined_data.html b/dev/reference/get_joined_data.html
index 49b3ffbed4..865ee10ae7 100644
--- a/dev/reference/get_joined_data.html
+++ b/dev/reference/get_joined_data.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_joined_sub_data.html b/dev/reference/get_joined_sub_data.html
index 00b22f618d..483216ef6e 100644
--- a/dev/reference/get_joined_sub_data.html
+++ b/dev/reference/get_joined_sub_data.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_many_to_one_dataset.html b/dev/reference/get_many_to_one_dataset.html
index 067e51dec0..6dc8a01289 100644
--- a/dev/reference/get_many_to_one_dataset.html
+++ b/dev/reference/get_many_to_one_dataset.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_not_mapped.html b/dev/reference/get_not_mapped.html
index 541e7c2a7f..ecfc43adb0 100644
--- a/dev/reference/get_not_mapped.html
+++ b/dev/reference/get_not_mapped.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_one_to_many_dataset.html b/dev/reference/get_one_to_many_dataset.html
index d67d5b0c24..01ec97cb17 100644
--- a/dev/reference/get_one_to_many_dataset.html
+++ b/dev/reference/get_one_to_many_dataset.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_partialdatetime.html b/dev/reference/get_partialdatetime.html
index 4823d39520..c559bc4033 100644
--- a/dev/reference/get_partialdatetime.html
+++ b/dev/reference/get_partialdatetime.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_summary_records.html b/dev/reference/get_summary_records.html
index 3659af8bb3..591b61bc83 100644
--- a/dev/reference/get_summary_records.html
+++ b/dev/reference/get_summary_records.html
@@ -19,7 +19,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_terms_from_db.html b/dev/reference/get_terms_from_db.html
index 04e02d001d..c039655777 100644
--- a/dev/reference/get_terms_from_db.html
+++ b/dev/reference/get_terms_from_db.html
@@ -13,7 +13,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/get_vars_query.html b/dev/reference/get_vars_query.html
index 0b75d2348d..8382b05d05 100644
--- a/dev/reference/get_vars_query.html
+++ b/dev/reference/get_vars_query.html
@@ -15,7 +15,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/impute_dtc_dt.html b/dev/reference/impute_dtc_dt.html
index 1242542724..59207bda19 100644
--- a/dev/reference/impute_dtc_dt.html
+++ b/dev/reference/impute_dtc_dt.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/impute_dtc_dtm.html b/dev/reference/impute_dtc_dtm.html
index 1332335e7e..2c44920977 100644
--- a/dev/reference/impute_dtc_dtm.html
+++ b/dev/reference/impute_dtc_dtm.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/index.html b/dev/reference/index.html
index 7cecc08074..bb9232b79b 100644
--- a/dev/reference/index.html
+++ b/dev/reference/index.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/list_all_templates.html b/dev/reference/list_all_templates.html
index ed89ae25b2..a98260b6b9 100644
--- a/dev/reference/list_all_templates.html
+++ b/dev/reference/list_all_templates.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/list_tte_source_objects.html b/dev/reference/list_tte_source_objects.html
index 5279cc7c00..c652636ad3 100644
--- a/dev/reference/list_tte_source_objects.html
+++ b/dev/reference/list_tte_source_objects.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/max_cond.html b/dev/reference/max_cond.html
index 24a6647457..ed071158b6 100644
--- a/dev/reference/max_cond.html
+++ b/dev/reference/max_cond.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/min_cond.html b/dev/reference/min_cond.html
index d4d1f8d8e3..02bb8cb1ce 100644
--- a/dev/reference/min_cond.html
+++ b/dev/reference/min_cond.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/negate_vars.html b/dev/reference/negate_vars.html
index 4bb9c84967..19cc573129 100644
--- a/dev/reference/negate_vars.html
+++ b/dev/reference/negate_vars.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/params.html b/dev/reference/params.html
index 97a8cd097c..374244145b 100644
--- a/dev/reference/params.html
+++ b/dev/reference/params.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/pipe.html b/dev/reference/pipe.html
index 09543599db..ad27f0a23c 100644
--- a/dev/reference/pipe.html
+++ b/dev/reference/pipe.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/print.adam_templates.html b/dev/reference/print.adam_templates.html
index c8cfe4a13d..62bd6804e8 100644
--- a/dev/reference/print.adam_templates.html
+++ b/dev/reference/print.adam_templates.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/print.duplicates.html b/dev/reference/print.duplicates.html
index a6dca4ff09..3a1821d96d 100644
--- a/dev/reference/print.duplicates.html
+++ b/dev/reference/print.duplicates.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/print.source.html b/dev/reference/print.source.html
index 41827b31bb..6ceaf74fb1 100644
--- a/dev/reference/print.source.html
+++ b/dev/reference/print.source.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/print_named_list.html b/dev/reference/print_named_list.html
index 80d6df922b..43b082c68c 100644
--- a/dev/reference/print_named_list.html
+++ b/dev/reference/print_named_list.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/queries.html b/dev/reference/queries.html
index 3e5b071f87..ae72f50234 100644
--- a/dev/reference/queries.html
+++ b/dev/reference/queries.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/queries_mh.html b/dev/reference/queries_mh.html
index 092c4cf305..633537235e 100644
--- a/dev/reference/queries_mh.html
+++ b/dev/reference/queries_mh.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/query.html b/dev/reference/query.html
index 19f8f14344..7e99b24c76 100644
--- a/dev/reference/query.html
+++ b/dev/reference/query.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/records_source.html b/dev/reference/records_source.html
index bf2b59f55a..0d96f99961 100644
--- a/dev/reference/records_source.html
+++ b/dev/reference/records_source.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/reexport-desc.html b/dev/reference/reexport-desc.html
index c72fed8029..9b8e5f046b 100644
--- a/dev/reference/reexport-desc.html
+++ b/dev/reference/reexport-desc.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/reexport-exprs.html b/dev/reference/reexport-exprs.html
index 5a11bbd132..7760be0cbb 100644
--- a/dev/reference/reexport-exprs.html
+++ b/dev/reference/reexport-exprs.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/restrict_derivation.html b/dev/reference/restrict_derivation.html
index af85201eea..2c7a424a26 100644
--- a/dev/reference/restrict_derivation.html
+++ b/dev/reference/restrict_derivation.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/restrict_imputed_dtc_dt.html b/dev/reference/restrict_imputed_dtc_dt.html
index 3cf4948f67..6c7807bbed 100644
--- a/dev/reference/restrict_imputed_dtc_dt.html
+++ b/dev/reference/restrict_imputed_dtc_dt.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/restrict_imputed_dtc_dtm.html b/dev/reference/restrict_imputed_dtc_dtm.html
index 38a6bd0d30..c798254d71 100644
--- a/dev/reference/restrict_imputed_dtc_dtm.html
+++ b/dev/reference/restrict_imputed_dtc_dtm.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/set_admiral_options.html b/dev/reference/set_admiral_options.html
index 999d49b332..fa7c13648a 100644
--- a/dev/reference/set_admiral_options.html
+++ b/dev/reference/set_admiral_options.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/signal_duplicate_records.html b/dev/reference/signal_duplicate_records.html
index 9a2f8c0d85..500339a7e9 100644
--- a/dev/reference/signal_duplicate_records.html
+++ b/dev/reference/signal_duplicate_records.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/slice_derivation.html b/dev/reference/slice_derivation.html
index 36ad8e6bf4..b6b5edec05 100644
--- a/dev/reference/slice_derivation.html
+++ b/dev/reference/slice_derivation.html
@@ -11,7 +11,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/transform_range.html b/dev/reference/transform_range.html
index 651a758ee1..bbdd339b86 100644
--- a/dev/reference/transform_range.html
+++ b/dev/reference/transform_range.html
@@ -9,7 +9,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/tte_source.html b/dev/reference/tte_source.html
index c49413c94d..0aa08d3ecc 100644
--- a/dev/reference/tte_source.html
+++ b/dev/reference/tte_source.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/tte_source_objects.html b/dev/reference/tte_source_objects.html
index 35a5146318..b0b33868a3 100644
--- a/dev/reference/tte_source_objects.html
+++ b/dev/reference/tte_source_objects.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/use_ad_template.html b/dev/reference/use_ad_template.html
index b8ad46ad1f..db346c32b6 100644
--- a/dev/reference/use_ad_template.html
+++ b/dev/reference/use_ad_template.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/reference/yn_to_numeric.html b/dev/reference/yn_to_numeric.html
index f41242237e..7926e1c8b3 100644
--- a/dev/reference/yn_to_numeric.html
+++ b/dev/reference/yn_to_numeric.html
@@ -7,7 +7,7 @@
admiral
- 1.1.1.9045
+ 1.1.1.9046
diff --git a/dev/search.json b/dev/search.json
index a2479a7936..6f0d9f9dd3 100644
--- a/dev/search.json
+++ b/dev/search.json
@@ -1 +1 @@
-[{"path":"https://pharmaverse.github.io/admiral/dev/CODE_OF_CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Contributor Code of Conduct","title":"Contributor Code of Conduct","text":"contributors maintainers project, pledge respect people contribute reporting issues, posting feature requests, updating documentation, submitting pull requests patches, activities. committed making participation project harassment-free experience everyone, regardless level experience, gender, gender identity expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion. Examples unacceptable behavior participants include use sexual language imagery, derogatory comments personal attacks, trolling, public private harassment, insults, unprofessional conduct. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct. Project maintainers follow Code Conduct may removed project team. Instances abusive, harassing, otherwise unacceptable behavior may reported opening issue contacting one project maintainers. Code Conduct adapted Contributor Covenant (http://www.contributor-covenant.org), version 1.0.0, available http://www.contributor-covenant.org/version/1/0/0/","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contribution to {admiral}","title":"Contribution to {admiral}","text":"outlines propose change admiral package. detailed info contributing {admiral}, pharmaverse packages, please see Contribution Guide well Developer Guides Articles section {admiraldev} website. Please note try align best practices used R packages’ development processes - veteran developers familiar processes. However, deviate slightly best practices advise new contributors review package documentation accordingly.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/CONTRIBUTING.html","id":"basics-of-contribution","dir":"","previous_headings":"","what":"Basics of Contribution","title":"Contribution to {admiral}","text":"🦋 new contribution, user creates issue issue tab GitHub put backlog. issues can range bug identification /fixes, enhancements functions, documentation, tests new features. 🦋 advise contact us issue created via Slack (don’t access, use link join). can discuss details align expectations familiar admiral philosophy programming strategy. team try review issues within next backlog meeting give initial feedback. Since 100% fully resourced software development team might issues take longer respond depending amount overall issues. 🦋 advise familiarize programming strategy, guidance GitHub usage unit testing. 🦋 newly created issues reviewed within next backlog meeting creator receive initial feedback via comment. Someone core development team triage new issues assigning appropriate labels (“user request” can easily identify new requests). 🦋 Issues meant taken users Pharma programming community exclusively admiral team GSK Roche.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/CONTRIBUTING.html","id":"type-1-contribution-without-code","dir":"","previous_headings":"","what":"Type 1: Contribution without Code","title":"Contribution to {admiral}","text":"🦋 User creates issue ideally contacts admiral team member via Slack. 🦋 admiral core development team contact issue creator soon possible discuss details.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/CONTRIBUTING.html","id":"type-2-contribution-with-code","dir":"","previous_headings":"","what":"Type 2: Contribution with Code","title":"Contribution to {admiral}","text":"🦋 First, user creates issue comments existing issue notify ’d like contribute code. 🦋 Follow development process step--step guide. 🦋 advise contact admiral core development team directly via Slack submitting code complex functionality.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/CONTRIBUTING.html","id":"detailed-development-process","dir":"","previous_headings":"","what":"Detailed Development Process","title":"Contribution to {admiral}","text":"decide contribute code ’re ready make first code contribution, detailed development process step--step guide help tie detailed vignettes together give simplest experience helping grow enhance codebase. Create new feature branch main branch following naming convention pull latest changes - detailed GitHub usage guide. Familiarize admiral programming strategy, make required code updates. code formatted according tidyverse style guide? create/add appropriate unit tests? removed/replaced function /function parameters, fully follow deprecation guidance? update [documentation]https://pharmaverse.github.io/admiraldev/articles/programming_strategy.html#function-header-documentation)? , remember run devtools::document() include updated NAMESPACE .Rd files man/. code update impact ADaM template R scripts stored inst/templates? code update impact vignettes stored vignettes? update Changelog NEWS.md? build admiral site pkgdown::build_site() check affected examples displayed correctly new functions occur “Reference” page? happy updates, make pull request merge main branch link issue closes successful merging. Check merge conflicts. , fix requesting review. See solving merge conflicts guidance. Check results automated R-CMD check lintr checks issues consult guide. Assign reviewer admiral core development team - anyone discussed issue previously via Slack GitHub. unsure, add comment pull request ready review add @pharmaverse/admiral tag . review completed, reviewer merge PR automatically delete feature branch. Finally, just note say core developers hugely appreciate taking time contribute admiral. Don’t offended review send requests back , expectations high can ensure admiral codebase remains robust consistent. best way learn always jump get involved, please don’t afraid ’ll make mistakes along way – continue , ’s reviews . Also ever get stuck don’t hesitate reach support via Slack channel. Welcome admiral community!","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"Apache License","title":"Apache License","text":"Version 2.0, January 2004 ","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_1-definitions","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"1. Definitions","title":"Apache License","text":"“License” shall mean terms conditions use, reproduction, distribution defined Sections 1 9 document. “Licensor” shall mean copyright owner entity authorized copyright owner granting License. “Legal Entity” shall mean union acting entity entities control, controlled , common control entity. purposes definition, “control” means () power, direct indirect, cause direction management entity, whether contract otherwise, (ii) ownership fifty percent (50%) outstanding shares, (iii) beneficial ownership entity. “” (“”) shall mean individual Legal Entity exercising permissions granted License. “Source” form shall mean preferred form making modifications, including limited software source code, documentation source, configuration files. “Object” form shall mean form resulting mechanical transformation translation Source form, including limited compiled object code, generated documentation, conversions media types. “Work” shall mean work authorship, whether Source Object form, made available License, indicated copyright notice included attached work (example provided Appendix ). “Derivative Works” shall mean work, whether Source Object form, based (derived ) Work editorial revisions, annotations, elaborations, modifications represent, whole, original work authorship. purposes License, Derivative Works shall include works remain separable , merely link (bind name) interfaces , Work Derivative Works thereof. “Contribution” shall mean work authorship, including original version Work modifications additions Work Derivative Works thereof, intentionally submitted Licensor inclusion Work copyright owner individual Legal Entity authorized submit behalf copyright owner. purposes definition, “submitted” means form electronic, verbal, written communication sent Licensor representatives, including limited communication electronic mailing lists, source code control systems, issue tracking systems managed , behalf , Licensor purpose discussing improving Work, excluding communication conspicuously marked otherwise designated writing copyright owner “Contribution.” “Contributor” shall mean Licensor individual Legal Entity behalf Contribution received Licensor subsequently incorporated within Work.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_2-grant-of-copyright-license","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"2. Grant of Copyright License","title":"Apache License","text":"Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable copyright license reproduce, prepare Derivative Works , publicly display, publicly perform, sublicense, distribute Work Derivative Works Source Object form.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_3-grant-of-patent-license","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"3. Grant of Patent License","title":"Apache License","text":"Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable (except stated section) patent license make, made, use, offer sell, sell, import, otherwise transfer Work, license applies patent claims licensable Contributor necessarily infringed Contribution(s) alone combination Contribution(s) Work Contribution(s) submitted. institute patent litigation entity (including cross-claim counterclaim lawsuit) alleging Work Contribution incorporated within Work constitutes direct contributory patent infringement, patent licenses granted License Work shall terminate date litigation filed.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_4-redistribution","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"4. Redistribution","title":"Apache License","text":"may reproduce distribute copies Work Derivative Works thereof medium, without modifications, Source Object form, provided meet following conditions: () must give recipients Work Derivative Works copy License; (b) must cause modified files carry prominent notices stating changed files; (c) must retain, Source form Derivative Works distribute, copyright, patent, trademark, attribution notices Source form Work, excluding notices pertain part Derivative Works; (d) Work includes “NOTICE” text file part distribution, Derivative Works distribute must include readable copy attribution notices contained within NOTICE file, excluding notices pertain part Derivative Works, least one following places: within NOTICE text file distributed part Derivative Works; within Source form documentation, provided along Derivative Works; , within display generated Derivative Works, wherever third-party notices normally appear. contents NOTICE file informational purposes modify License. may add attribution notices within Derivative Works distribute, alongside addendum NOTICE text Work, provided additional attribution notices construed modifying License. may add copyright statement modifications may provide additional different license terms conditions use, reproduction, distribution modifications, Derivative Works whole, provided use, reproduction, distribution Work otherwise complies conditions stated License.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_5-submission-of-contributions","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"5. Submission of Contributions","title":"Apache License","text":"Unless explicitly state otherwise, Contribution intentionally submitted inclusion Work Licensor shall terms conditions License, without additional terms conditions. Notwithstanding , nothing herein shall supersede modify terms separate license agreement may executed Licensor regarding Contributions.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_6-trademarks","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"6. Trademarks","title":"Apache License","text":"License grant permission use trade names, trademarks, service marks, product names Licensor, except required reasonable customary use describing origin Work reproducing content NOTICE file.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_7-disclaimer-of-warranty","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"7. Disclaimer of Warranty","title":"Apache License","text":"Unless required applicable law agreed writing, Licensor provides Work (Contributor provides Contributions) “” BASIS, WITHOUT WARRANTIES CONDITIONS KIND, either express implied, including, without limitation, warranties conditions TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS PARTICULAR PURPOSE. solely responsible determining appropriateness using redistributing Work assume risks associated exercise permissions License.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_8-limitation-of-liability","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"8. Limitation of Liability","title":"Apache License","text":"event legal theory, whether tort (including negligence), contract, otherwise, unless required applicable law (deliberate grossly negligent acts) agreed writing, shall Contributor liable damages, including direct, indirect, special, incidental, consequential damages character arising result License use inability use Work (including limited damages loss goodwill, work stoppage, computer failure malfunction, commercial damages losses), even Contributor advised possibility damages.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"id_9-accepting-warranty-or-additional-liability","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"9. Accepting Warranty or Additional Liability","title":"Apache License","text":"redistributing Work Derivative Works thereof, may choose offer, charge fee , acceptance support, warranty, indemnity, liability obligations /rights consistent License. However, accepting obligations, may act behalf sole responsibility, behalf Contributor, agree indemnify, defend, hold Contributor harmless liability incurred , claims asserted , Contributor reason accepting warranty additional liability. END TERMS CONDITIONS","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/LICENSE.html","id":"appendix-how-to-apply-the-apache-license-to-your-work","dir":"","previous_headings":"","what":"APPENDIX: How to apply the Apache License to your work","title":"Apache License","text":"apply Apache License work, attach following boilerplate notice, fields enclosed brackets [] replaced identifying information. (Don’t include brackets!) text enclosed appropriate comment syntax file format. also recommend file class name description purpose included “printed page” copyright notice easier identification within third-party archives.","code":"Copyright 2021 F. Hoffmann-La Roche AG and GlaxoSmithKline LLC Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"main-idea","dir":"Articles","previous_headings":"","what":"Main Idea","title":"Get Started","text":"main idea admiral ADaM dataset built sequence derivations. derivation adds one variables records processed dataset. modular approach makes easy adjust code adding, removing, modifying derivations. derivation function call. vignette explore different type derivation functions offered admiral, well argument conventions follow best start admiral script.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"setup","dir":"Articles","previous_headings":"","what":"Setup","title":"Get Started","text":"help examples showcased, load packages set example data manipulate later. dplyr, lubridate stringr packages tidyverse packages used heavily throughout vignette. admiral package also leverages pharmaversesdtm package example SDTM datasets CDISC Pilot Study. adsl advs objects now prepared showcase addition variables addition records later. Note: example , reading dummy R data pharmaversesdtm. However, using SAS datasets starting point, sure consult section Handling Missing Values Programming Concepts Conventions User Guide learn use function convert_blanks_to_na() process.","code":"# Uncomment line below if you need to install these packages # install.packages(c(\"dplyr\", \"lubridate\", \"stringr\", \"tibble\", \"pharmaversesdtm\", \"admiral\")) library(dplyr, warn.conflicts = FALSE) library(lubridate) library(stringr) library(tibble) library(pharmaversesdtm) library(admiral) # Read in SDTM datasets dm <- pharmaversesdtm::dm ds <- pharmaversesdtm::ds ex <- pharmaversesdtm::ex vs <- pharmaversesdtm::vs admiral_adsl <- admiral::admiral_adsl ex_ext <- ex %>% derive_vars_dtm( dtc = EXSTDTC, new_vars_prefix = \"EXST\" ) vs <- vs %>% filter( USUBJID %in% c( \"01-701-1015\", \"01-701-1023\", \"01-703-1086\", \"01-703-1096\", \"01-707-1037\", \"01-716-1024\" ) & VSTESTCD %in% c(\"SYSBP\", \"DIABP\") & VSPOS == \"SUPINE\" ) adsl <- admiral_adsl %>% select(-TRTSDTM, -TRTSTMF) advs <- vs %>% mutate( PARAM = VSTEST, PARAMCD = VSTESTCD, AVAL = VSSTRESN, AVALU = VSORRESU, AVISIT = VISIT, AVISITN = VISITNUM )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"derivation-functions","dir":"Articles","previous_headings":"","what":"Derivation Functions","title":"Get Started","text":"important functions admiral derivations. Derivations add variables observations/records input dataset. Existing variables observations input dataset changed. Derivation functions start derive_. first argument functions expects input dataset. allows us string together derivations using %>% operator. Functions derive dedicated variable start derive_var_ followed variable name, e.g., derive_var_trtdurd() derives TRTDURD variable. Functions can derive multiple variables start derive_vars_ followed variable name, e.g., derive_vars_dtm() can derive TRTSDTM TRTSTMF variables. Functions derive dedicated parameter start derive_param_ followed parameter name, e.g., derive_param_bmi() derives BMI parameter.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"addvars","dir":"Articles","previous_headings":"Derivation Functions","what":"Example: Adding Variables","title":"Get Started","text":"can see example call one common derivation functions, derive_vars_merged(). function adds variable(s) input dataset based contents another dataset. example, add treatment start datetime corresponding imputation flag (EXSTTMF) adsl identifying first record ex non-missing Exposure Start Datetime (EXSTDTM) sorting EXSTDM EXSEQ.","code":"adsl <- adsl %>% derive_vars_merged( dataset_add = ex_ext, filter_add = !is.na(EXSTDTM), new_vars = exprs(TRTSDTM = EXSTDTM, TRTSTMF = EXSTTMF), order = exprs(EXSTDTM, EXSEQ), mode = \"first\", by_vars = exprs(STUDYID, USUBJID) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"addrecs","dir":"Articles","previous_headings":"Derivation Functions","what":"Example: Adding Records","title":"Get Started","text":"Another common derivation function derive_param_computed(). function adds derived parameter input dataset. example , use derive Mean Arterial Pressure (MAP) Systolic Diastolic values blood pressure. parameters needed derivation specified parameters argument, within set_values_to set variable values new derived record. Note: users’ convenience, admiral actually provides derive_param_map() (wrapper derive_param_computed()) derive MAP. example serves illustrative purposes .","code":"advs <- advs %>% derive_param_computed( by_vars = exprs(USUBJID, AVISIT, AVISITN), parameters = c(\"SYSBP\", \"DIABP\"), set_values_to = exprs( AVAL = (AVAL.SYSBP + 2 * AVAL.DIABP) / 3, PARAMCD = \"MAP\", PARAM = \"Mean Arterial Pressure (mmHg)\", AVALU = \"mmHg\" ) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"other-types-of-functions","dir":"Articles","previous_headings":"","what":"Other Types of Functions","title":"Get Started","text":"Along derivation functions, admiral provides large arsenal functions help ADaM derivations. categories.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"higher-order-functions","dir":"Articles","previous_headings":"Other Types of Functions","what":"Higher Order Functions","title":"Get Started","text":"Higher order functions admiral functions take functions input. enhance existing portfolio derivation functions allowing greater customization latter’s behavior. done allowing derivation function : call_derivation() - Called multiple times, varying input arguments. restrict_derivation() - Executed subset input dataset. slice_derivation() - Executed differently subsets input dataset. Higher order functions relatively advanced topic within admiral; can can read dedicated vignette Higher Order Functions.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"computation-functions","dir":"Articles","previous_headings":"Other Types of Functions","what":"Computation Functions","title":"Get Started","text":"Computations expect vectors input return vector. Usually computation functions can used %>%. functions can used expressions like convert_dtc_to_dt() derivation Final Lab Visit Date (FINLABDT) example : Computations can also used inside mutate() statement (similar), can leveraged variable derivations require calls specific admiral functions:","code":"# Add the date of the final lab visit to ADSL adsl <- dm %>% derive_vars_merged( dataset_add = ds, by_vars = exprs(USUBJID), new_vars = exprs(FINLABDT = convert_dtc_to_dt(DSSTDTC)), filter_add = DSDECOD == \"FINAL LAB VISIT\" ) adsl <- adsl %>% mutate(RFSTDT = convert_dtc_to_dt(RFSTDTC))"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"filter-functions","dir":"Articles","previous_headings":"Other Types of Functions","what":"Filter Functions","title":"Get Started","text":"Filter functions admiral utilities filter input dataset different manners, instance returning records fit/don’t fit certain condition first/last observation group. functions form important internal backbone admiral functions, can also used explore manipulate dataset. instance, example use filter_extreme() extract recent MAP records advs:","code":"advs_lastmap <- advs %>% filter(PARAMCD == \"MAP\") %>% filter_extreme( by_vars = exprs(USUBJID), order = exprs(AVISITN, PARAMCD), mode = \"last\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"argument-conventions","dir":"Articles","previous_headings":"","what":"Argument Conventions","title":"Get Started","text":"Within admiral package, arguments expect variable names expressions variable names, symbols expressions must specified rather strings. arguments expect single variable name, name can specified without quotes quotation, e.g. new_var = TEMPBL arguments expect one variable names, list symbols expected, e.g. by_vars = exprs(PARAMCD, AVISIT) arguments expect single expression, expression needs passed “”, e.g. filter = PARAMCD == \"TEMP\" arguments expect one expressions, list expressions expected, e.g. order = exprs(AVISIT, desc(AESEV)) new expressions, consider reading Expressions Scripts section Concepts Conventions User Guide learn .","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"starting-a-script","dir":"Articles","previous_headings":"","what":"Starting a Script","title":"Get Started","text":"ADaM data structures, overview flow example function calls common steps provided following vignettes: Creating ADSL Creating OCCDS ADaM Creating BDS Findings ADaM admiral also provides template R scripts starting point. can created calling use_ad_template(), e.g., list available templates can obtained list_all_templates():","code":"use_ad_template( adam_name = \"adsl\", save_path = \"./ad_adsl.R\" ) library(admiral) list_all_templates() #> Existing ADaM templates in package 'admiral': #> • ADAE #> • ADCM #> • ADEG #> • ADEX #> • ADLB #> • ADLBHY #> • ADMH #> • ADPC #> • ADPP #> • ADPPK #> • ADSL #> • ADVS"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"support","dir":"Articles","previous_headings":"","what":"Support","title":"Get Started","text":"Support provided via admiral Slack channel. Additionally, please feel free raise issues GitHub repository.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/admiral.html","id":"see-also","dir":"Articles","previous_headings":"","what":"See also","title":"Get Started","text":"Template scripts Programming Concepts Conventions Programming Strategy","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Creating ADSL","text":"article describes creating ADSL ADaM. Examples currently presented tested using DM, EX , AE, LB DS SDTM domains. However, domains used. Note: examples assume CDISC SDTM /ADaM format input unless otherwise specified.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"programming-flow","dir":"Articles","previous_headings":"","what":"Programming Flow","title":"Creating ADSL","text":"Read Data Derive Period, Subperiod, Phase Variables (e.g. APxxSDT, APxxEDT, …) Derive Treatment Variables (TRT0xP, TRT0xA) Derive/Impute Numeric Treatment Date/Time Duration (TRTSDT, TRTEDT, TRTDURD) Disposition Dates (e.g. EOSDT) Disposition Status (e.g. EOSTT) Disposition Reason(s) (e.g. DCSREAS, DCSREASP) Randomization Date (RANDDT) Death Date (DTHDT) Cause Death (DTHCAUS) Duration Relative Death Derive Last Known Date Alive (LSTALVDT) Grouping (e.g. AGEGR1 REGION1) Population Flags (e.g. SAFFL) Derive Variables Add Labels Attributes","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"readdata","dir":"Articles","previous_headings":"Programming Flow","what":"Read in Data","title":"Creating ADSL","text":"start, data frames needed creation ADSL read environment. company specific process. data frames needed may DM, EX, DS, AE, LB. example purpose, CDISC Pilot SDTM datasets—included pharmaversesdtm—used. DM domain used basis ADSL:","code":"library(admiral) library(dplyr, warn.conflicts = FALSE) library(pharmaversesdtm) library(lubridate) library(stringr) dm <- pharmaversesdtm::dm ds <- pharmaversesdtm::ds ex <- pharmaversesdtm::ex ae <- pharmaversesdtm::ae lb <- pharmaversesdtm::lb dm <- convert_blanks_to_na(dm) ds <- convert_blanks_to_na(ds) ex <- convert_blanks_to_na(ex) ae <- convert_blanks_to_na(ae) lb <- convert_blanks_to_na(lb) adsl <- dm %>% select(-DOMAIN)"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"periodvars","dir":"Articles","previous_headings":"Programming Flow","what":"Derive Period, Subperiod, and Phase Variables (e.g. APxxSDT, APxxEDT, …)","title":"Creating ADSL","text":"See “Visit Period Variables” vignette information. variables derived based period reference dataset, may derived later point flow. example, phases like “Treatment Phase” “Follow ” derived based treatment start end date.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"treatmentvar","dir":"Articles","previous_headings":"Programming Flow","what":"Derive Treatment Variables (TRT0xP, TRT0xA)","title":"Creating ADSL","text":"mapping treatment variables left ADaM programmer. example mapping study without periods may : studies periods see “Visit Period Variables” vignette.","code":"adsl <- dm %>% mutate(TRT01P = ARM, TRT01A = ACTARM)"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"trtdatetime","dir":"Articles","previous_headings":"Programming Flow","what":"Derive/Impute Numeric Treatment Date/Time and Duration (TRTSDTM, TRTEDTM, TRTDURD)","title":"Creating ADSL","text":"function derive_vars_merged() can used derive treatment start end date/times using ex domain. pre-processing step ex required convert variable EXSTDTC EXSTDTC datetime variables impute missing date time components. Conversion imputation done derive_vars_dtm(). Example calls: call returns original data frame column TRTSDTM, TRTSTMF, TRTEDTM, TRTETMF added. Exposure observations incomplete date zero doses non placebo treatments ignored. Missing time parts imputed first last start end date respectively. datetime variables returned can converted dates using derive_vars_dtm_to_dt() function. Now, TRTSDT TRTEDT derived, function derive_var_trtdurd() can used calculate Treatment duration (TRTDURD).","code":"# impute start and end time of exposure to first and last respectively, # do not impute date ex_ext <- ex %>% derive_vars_dtm( dtc = EXSTDTC, new_vars_prefix = \"EXST\" ) %>% derive_vars_dtm( dtc = EXENDTC, new_vars_prefix = \"EXEN\", time_imputation = \"last\" ) adsl <- adsl %>% derive_vars_merged( dataset_add = ex_ext, filter_add = (EXDOSE > 0 | (EXDOSE == 0 & str_detect(EXTRT, \"PLACEBO\"))) & !is.na(EXSTDTM), new_vars = exprs(TRTSDTM = EXSTDTM, TRTSTMF = EXSTTMF), order = exprs(EXSTDTM, EXSEQ), mode = \"first\", by_vars = exprs(STUDYID, USUBJID) ) %>% derive_vars_merged( dataset_add = ex_ext, filter_add = (EXDOSE > 0 | (EXDOSE == 0 & str_detect(EXTRT, \"PLACEBO\"))) & !is.na(EXENDTM), new_vars = exprs(TRTEDTM = EXENDTM, TRTETMF = EXENTMF), order = exprs(EXENDTM, EXSEQ), mode = \"last\", by_vars = exprs(STUDYID, USUBJID) ) adsl <- adsl %>% derive_vars_dtm_to_dt(source_vars = exprs(TRTSDTM, TRTEDTM)) adsl <- adsl %>% derive_var_trtdurd()"},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"disposition_date","dir":"Articles","previous_headings":"Programming Flow > Derive Disposition Variables","what":"Disposition Dates (e.g. EOSDT)","title":"Creating ADSL","text":"functions derive_vars_dt() derive_vars_merged() can used derive disposition date. First character disposition date (DS.DSSTDTC) converted numeric date (DSSTDT) calling derive_vars_dt(). DS dataset extended DSSTDT variable date required derivations, e.g., RANDDT well. relevant disposition date selected adjusting filter_add argument. add End Study date (EOSDT) input dataset, call : ds_ext dataset: adsl dataset: derive_vars_dt() function allows impute partial dates well. imputation needed missing days imputed first month missing months first month year, set highest_imputation = \"M\".","code":"# convert character date to numeric date without imputation ds_ext <- derive_vars_dt( ds, dtc = DSSTDTC, new_vars_prefix = \"DSST\" ) adsl <- adsl %>% derive_vars_merged( dataset_add = ds_ext, by_vars = exprs(STUDYID, USUBJID), new_vars = exprs(EOSDT = DSSTDT), filter_add = DSCAT == \"DISPOSITION EVENT\" & DSDECOD != \"SCREEN FAILURE\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"disposition_status","dir":"Articles","previous_headings":"Programming Flow > Derive Disposition Variables","what":"Disposition Status (e.g. EOSSTT)","title":"Creating ADSL","text":"function derive_vars_merged() can used derive End Study status (EOSSTT) based DSCAT DSDECOD DS. relevant observations selected adjusting filter_add argument. function mapping DSDECOD values EOSSTT values can defined used new_vars argument. mapping call \"COMPLETED\" DSDECOD == \"COMPLETED\" NA_character_ DSDECOD \"SCREEN FAILURE\" \"DISCONTINUED\" otherwise Example function format_eosstt(): customized mapping function format_eosstt() can now passed main function. subjects without disposition event end study status set \"ONGOING\" specifying missing_values argument. call return input dataset column EOSSTT added. derivation must changed, user can create /function map DSDECOD suitable EOSSTT value.","code":"format_eosstt <- function(x) { case_when( x %in% c(\"COMPLETED\") ~ \"COMPLETED\", x %in% c(\"SCREEN FAILURE\") ~ NA_character_, TRUE ~ \"DISCONTINUED\" ) } adsl <- adsl %>% derive_vars_merged( dataset_add = ds, by_vars = exprs(STUDYID, USUBJID), filter_add = DSCAT == \"DISPOSITION EVENT\", new_vars = exprs(EOSSTT = format_eosstt(DSDECOD)), missing_values = exprs(EOSSTT = \"ONGOING\") )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"disposition_reason","dir":"Articles","previous_headings":"Programming Flow > Derive Disposition Variables","what":"Disposition Reason(s) (e.g. DCSREAS, DCSREASP)","title":"Creating ADSL","text":"main reason discontinuation usually stored DSDECOD DSTERM provides additional details regarding subject’s discontinuation (e.g., description \"\"). function derive_vars_merged() can used derive disposition reason (along details, required) specific timepoint. relevant observations selected adjusting filter_add argument. derive End Study reason(s) (DCSREAS DCSREASP), function map DCSREAS DSDECOD, DCSREASP DSTERM DSDECOD \"COMPLETED\", \"SCREEN FAILURE\", NA, NA otherwise. call return input dataset column DCSREAS DCSREASP added. derivation must changed, user can define derivation filter_add argument function map DSDECOD DSTERM suitable DCSREAS/DCSREASP value. call maps DCSREAS DCREASP follows: DCSREAS DSDECOD DSDECOD \"COMPLETED\" NA, NA otherwise DCSREASP DSTERM DSDECOD equal , NA otherwise","code":"adsl <- adsl %>% derive_vars_merged( dataset_add = ds, by_vars = exprs(USUBJID), new_vars = exprs(DCSREAS = DSDECOD, DCSREASP = DSTERM), filter_add = DSCAT == \"DISPOSITION EVENT\" & !(DSDECOD %in% c(\"SCREEN FAILURE\", \"COMPLETED\", NA)) ) adsl <- adsl %>% derive_vars_merged( dataset_add = ds, by_vars = exprs(USUBJID), new_vars = exprs(DCSREAS = DSDECOD), filter_add = DSCAT == \"DISPOSITION EVENT\" & DSDECOD %notin% c(\"SCREEN FAILURE\", \"COMPLETED\", NA) ) %>% derive_vars_merged( dataset_add = ds, by_vars = exprs(USUBJID), new_vars = exprs(DCSREASP = DSTERM), filter_add = DSCAT == \"DISPOSITION EVENT\" & DSDECOD %in% \"OTHER\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"randomization_date","dir":"Articles","previous_headings":"Programming Flow > Derive Disposition Variables","what":"Randomization Date (RANDDT)","title":"Creating ADSL","text":"function derive_vars_merged() can used derive randomization date variable. map Randomization Date (RANDDT), call : call return input dataset column RANDDT added.","code":"adsl <- adsl %>% derive_vars_merged( dataset_add = ds_ext, filter_add = DSDECOD == \"RANDOMIZED\", by_vars = exprs(STUDYID, USUBJID), new_vars = exprs(RANDDT = DSSTDT) )"},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"death_date","dir":"Articles","previous_headings":"Programming Flow > Derive Death Variables","what":"Death Date (DTHDT)","title":"Creating ADSL","text":"function derive_vars_dt() can used derive DTHDT. function allows user impute date well. Example calls: call return input dataset columns DTHDT added , default, associated date imputation flag (DTHDTF) populated controlled terminology outlined ADaM IG date imputations. imputation flag required, user must set argument flag_imputation \"none\". imputation needed date imputed first day month/year call : See also Date Time Imputation.","code":"adsl <- adsl %>% derive_vars_dt( new_vars_prefix = \"DTH\", dtc = DTHDTC ) adsl <- adsl %>% derive_vars_dt( new_vars_prefix = \"DTH\", dtc = DTHDTC, date_imputation = \"first\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"death_cause","dir":"Articles","previous_headings":"Programming Flow > Derive Death Variables","what":"Cause of Death (DTHCAUS)","title":"Creating ADSL","text":"cause death DTHCAUS can derived using function derive_vars_extreme_event(). Since cause death collected/mapped different domains (e.g. DS, AE, DD), important user specifies right source(s) derive cause death . example, date death collected AE form AE Fatal, cause death set preferred term (AEDECOD) Fatal AE, date death collected DS form, cause death set disposition term (DSTERM). achieve , event() objects within derive_vars_extreme_event() must specified defined fit study requirement. example call derive_vars_extreme_event() : function also offers option add traceability variables (e.g. DTHDOM store domain date death collected, DTHSEQ store xxSEQ value domain). traceability variables added event() calls included new_vars parameter derive_vars_extreme_event(). Following derivation DTHCAUS related traceability variables, possible derive grouping variables death categories (DTHCGRx) using standard tidyverse code.","code":"adsl <- adsl %>% derive_vars_extreme_event( by_vars = exprs(STUDYID, USUBJID), events = list( event( dataset_name = \"ae\", condition = AEOUT == \"FATAL\", set_values_to = exprs(DTHCAUS = AEDECOD), ), event( dataset_name = \"ds\", condition = DSDECOD == \"DEATH\" & grepl(\"DEATH DUE TO\", DSTERM), set_values_to = exprs(DTHCAUS = DSTERM), ) ), source_datasets = list(ae = ae, ds = ds), tmp_event_nr_var = event_nr, order = exprs(event_nr), mode = \"first\", new_vars = exprs(DTHCAUS) ) adsl <- adsl %>% select(-DTHCAUS) %>% # remove it before deriving it again derive_vars_extreme_event( by_vars = exprs(STUDYID, USUBJID), events = list( event( dataset_name = \"ae\", condition = AEOUT == \"FATAL\", set_values_to = exprs(DTHCAUS = AEDECOD, DTHDOM = \"AE\", DTHSEQ = AESEQ), ), event( dataset_name = \"ds\", condition = DSDECOD == \"DEATH\" & grepl(\"DEATH DUE TO\", DSTERM), set_values_to = exprs(DTHCAUS = DSTERM, DTHDOM = \"DS\", DTHSEQ = DSSEQ), ) ), source_datasets = list(ae = ae, ds = ds), tmp_event_nr_var = event_nr, order = exprs(event_nr), mode = \"first\", new_vars = exprs(DTHCAUS, DTHDOM, DTHSEQ) ) adsl <- adsl %>% mutate(DTHCGR1 = case_when( is.na(DTHDOM) ~ NA_character_, DTHDOM == \"AE\" ~ \"ADVERSE EVENT\", str_detect(DTHCAUS, \"(PROGRESSIVE DISEASE|DISEASE RELAPSE)\") ~ \"PROGRESSIVE DISEASE\", TRUE ~ \"OTHER\" ))"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"death_other","dir":"Articles","previous_headings":"Programming Flow > Derive Death Variables","what":"Duration Relative to Death","title":"Creating ADSL","text":"function derive_vars_duration() can used derive duration relative death like Relative Day Death (DTHADY) numbers days last dose death (LDDTHELD). Example calls: Relative Day Death Elapsed Days Last Dose Death","code":"adsl <- adsl %>% derive_vars_duration( new_var = DTHADY, start_date = TRTSDT, end_date = DTHDT ) adsl <- adsl %>% derive_vars_duration( new_var = LDDTHELD, start_date = TRTEDT, end_date = DTHDT, add_one = FALSE )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"lstalvdt","dir":"Articles","previous_headings":"Programming Flow","what":"Derive the Last Date Known Alive (LSTALVDT)","title":"Creating ADSL","text":"Similarly cause death (DTHCAUS), last known alive date (LSTALVDT) can derived multiples sources using derive_vars_extreme_event(). example (DTC dates converted numeric dates imputing missing day month first): Traceability variables can added specifying variables set_values_to parameter event() function.","code":"adsl <- adsl %>% derive_vars_extreme_event( by_vars = exprs(STUDYID, USUBJID), events = list( event( dataset_name = \"ae\", order = exprs(AESTDTC, AESEQ), condition = !is.na(AESTDTC), set_values_to = exprs( LSTALVDT = convert_dtc_to_dt(AESTDTC, highest_imputation = \"M\"), seq = AESEQ ), ), event( dataset_name = \"ae\", order = exprs(AEENDTC, AESEQ), condition = !is.na(AEENDTC), set_values_to = exprs( LSTALVDT = convert_dtc_to_dt(AEENDTC, highest_imputation = \"M\"), seq = AESEQ ), ), event( dataset_name = \"lb\", order = exprs(LBDTC, LBSEQ), condition = !is.na(LBDTC), set_values_to = exprs( LSTALVDT = convert_dtc_to_dt(LBDTC, highest_imputation = \"M\"), seq = LBSEQ ), ), event( dataset_name = \"adsl\", condition = !is.na(TRTEDT), set_values_to = exprs(LSTALVDT = TRTEDT, seq = 0), ) ), source_datasets = list(ae = ae, lb = lb, adsl = adsl), tmp_event_nr_var = event_nr, order = exprs(LSTALVDT, seq, event_nr), mode = \"last\", new_vars = exprs(LSTALVDT) ) adsl <- adsl %>% select(-LSTALVDT) %>% # created in the previous call derive_vars_extreme_event( by_vars = exprs(STUDYID, USUBJID), events = list( event( dataset_name = \"ae\", order = exprs(AESTDTC, AESEQ), condition = !is.na(AESTDTC), set_values_to = exprs( LSTALVDT = convert_dtc_to_dt(AESTDTC, highest_imputation = \"M\"), LALVSEQ = AESEQ, LALVDOM = \"AE\", LALVVAR = \"AESTDTC\" ), ), event( dataset_name = \"ae\", order = exprs(AEENDTC, AESEQ), condition = !is.na(AEENDTC), set_values_to = exprs( LSTALVDT = convert_dtc_to_dt(AEENDTC, highest_imputation = \"M\"), LALVSEQ = AESEQ, LALVDOM = \"AE\", LALVVAR = \"AEENDTC\" ), ), event( dataset_name = \"lb\", order = exprs(LBDTC, LBSEQ), condition = !is.na(LBDTC), set_values_to = exprs( LSTALVDT = convert_dtc_to_dt(LBDTC, highest_imputation = \"M\"), LALVSEQ = LBSEQ, LALVDOM = \"LB\", LALVVAR = \"LBDTC\" ), ), event( dataset_name = \"adsl\", condition = !is.na(TRTEDT), set_values_to = exprs(LSTALVDT = TRTEDT, LALVSEQ = NA_integer_, LALVDOM = \"ADSL\", LALVVAR = \"TRTEDTM\"), ) ), source_datasets = list(ae = ae, lb = lb, adsl = adsl), tmp_event_nr_var = event_nr, order = exprs(LSTALVDT, LALVSEQ, event_nr), mode = \"last\", new_vars = exprs(LSTALVDT, LALVSEQ, LALVDOM, LALVVAR) )"},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"groupings_ex","dir":"Articles","previous_headings":"Programming Flow > Derive Groupings and Populations","what":"Grouping (e.g. AGEGR1 or REGION1)","title":"Creating ADSL","text":"Numeric categorical variables (AGE, RACE, COUNTRY, etc.) may need grouped perform required analysis. admiral provides derive_vars_cat() function create groups. function especially useful one variable needs created condition, e.g., AGEGR1 AGEGR1N. Additionally, one needs careful considering order conditions lookup table. category assigned based first match. means catch-conditions must come specific conditions, e.g. !.na(AGE) must come AGE < 18. Alternatively, can also solve task custom functions:","code":"# create lookup tables agegr1_lookup <- exprs( ~condition, ~AGEGR1, AGE < 18, \"<18\", between(AGE, 18, 64), \"18-64\", AGE > 64, \">64\", is.na(AGE), \"Missing\" ) region1_lookup <- exprs( ~condition, ~REGION1, COUNTRY %in% c(\"CAN\", \"USA\"), \"North America\", !is.na(COUNTRY), \"Rest of the World\", is.na(COUNTRY), \"Missing\" ) adsl <- adsl %>% derive_vars_cat( definition = agegr1_lookup ) %>% derive_vars_cat( definition = region1_lookup ) format_agegr1 <- function(var_input) { case_when( var_input < 18 ~ \"<18\", between(var_input, 18, 64) ~ \"18-64\", var_input > 64 ~ \">64\", TRUE ~ \"Missing\" ) } format_region1 <- function(var_input) { case_when( var_input %in% c(\"CAN\", \"USA\") ~ \"North America\", !is.na(var_input) ~ \"Rest of the World\", TRUE ~ \"Missing\" ) } adsl %>% mutate( AGEGR1 = format_agegr1(AGE), REGION1 = format_region1(COUNTRY) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"popflag","dir":"Articles","previous_headings":"Programming Flow > Derive Groupings and Populations","what":"Population Flags (e.g. SAFFL)","title":"Creating ADSL","text":"Since populations flags mainly company/study specific dedicated functions provided, cases can easily derived using derive_var_merged_exist_flag. example implementation :","code":"adsl <- adsl %>% derive_var_merged_exist_flag( dataset_add = ex, by_vars = exprs(STUDYID, USUBJID), new_var = SAFFL, condition = (EXDOSE > 0 | (EXDOSE == 0 & str_detect(EXTRT, \"PLACEBO\"))) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"other","dir":"Articles","previous_headings":"Programming Flow","what":"Derive Other Variables","title":"Creating ADSL","text":"users can add specific code cover need analysis. following functions helpful many ADSL derivations: derive_vars_merged() - Merge Variables Dataset Input Dataset derive_var_merged_exist_flag() - Merge Existence Flag derive_var_merged_summary() - Merge Summary Variables See also Generic Functions.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/adsl.html","id":"attributes","dir":"Articles","previous_headings":"Programming Flow","what":"Add Labels and Attributes","title":"Creating ADSL","text":"Adding labels attributes SAS transport files supported following packages: metacore: establish common foundation use metadata within R session. metatools: enable use metacore objects. Metatools can used build datasets enhance columns existing datasets well checking datasets metadata. xportr: functionality associate metadata information local R data frame, perform data set level validation checks convert transport v5 file(xpt). NOTE: packages experimental phase, vision associated End End pipeline umbrella pharmaverse. example applying metadata perform associated checks can found pharmaverse E2E example.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Creating a BDS Exposure ADaM","text":"article describes creating Exposure ADaM using BDS structure. Examples currently presented using underlying EX domain EX domain represents data collected CRF ADEX ADaM output. However, examples can applied situations EC domain used input /ADEC another exposure ADaM created. many different approaches modeling exposure data. vignette gives examples creating PARAMCD AVAL combinations using exposure data. vignette meant guide standard structure exposure analysis datasets. Note: examples assume CDISC SDTM /ADaM format input unless otherwise specified.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"programming-workflow","dir":"Articles","previous_headings":"","what":"Programming Workflow","title":"Creating a BDS Exposure ADaM","text":"Read Data Derive/Impute Numeric Date/Time Analysis Day (ADT, ADTM, ADY, ADTF, ATMF) Compute Duration Record Create 1:1 Mapping Records Create Summary Records Assign PARAMCD, PARAMN, etc. Reference Tables Derive Categorization Variables (AVALCATy) Assign ASEQ Add ADSL variables ASEQ Add Labels Attributes","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"readdata","dir":"Articles","previous_headings":"Programming Workflow","what":"Read in Data","title":"Creating a BDS Exposure ADaM","text":"start, data frames needed creation ADEX read environment. company specific process. data frames needed may EX ADSL. example purpose, CDISC Pilot SDTM ADaM datasets—included pharmaversesdtm—used. step, may useful join ADSL EX domain well. ADSL variables used derivations selected step. rest relevant ADSL variables added later. CDISC pilot EX domain data contain dose adjustment flag planned dose information. demonstration purposes, added data.","code":"library(admiral) library(dplyr, warn.conflicts = FALSE) library(pharmaversesdtm) library(lubridate) library(stringr) library(tibble) ex <- pharmaversesdtm::ex adsl <- admiral::admiral_adsl ex <- convert_blanks_to_na(ex) adsl_vars <- exprs(TRTSDT, TRTSDTM, TRTEDT, TRTEDTM) adex <- derive_vars_merged( ex, dataset_add = adsl, new_vars = adsl_vars, by_vars = get_admiral_option(\"subject_keys\") ) adex <- adex %>% mutate( EXADJ = case_when( USUBJID == \"01-701-1028\" & VISIT %in% c(\"WEEK 2\") ~ \"ADVERSE EVENT\", USUBJID == \"01-701-1148\" & VISIT %in% c(\"WEEK 2\", \"WEEK 24\") ~ \"MEDICATION ERROR\", TRUE ~ NA_character_ ), EXDOSE = case_when( USUBJID == \"01-701-1028\" & VISIT %in% c(\"WEEK 2\") ~ 0, USUBJID == \"01-701-1148\" & VISIT %in% c(\"WEEK 2\", \"WEEK 24\") ~ 0, TRUE ~ EXDOSE ) ) %>% mutate(EXPLDOS = if_else(EXTRT == \"PLACEBO\", 0, 54)) distinct(adex, EXTRT, EXPLDOS) #> # A tibble: 2 × 2 #> EXTRT EXPLDOS #> #> 1 PLACEBO 0 #> 2 XANOMELINE 54 count(adex, EXADJ) #> # A tibble: 1 × 2 #> EXADJ n #> #> 1 NA 13"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"datetime","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive/Impute Numeric Date/Time and Analysis Day (ADT, ADTM, ADY, ADTF, ATMF)","title":"Creating a BDS Exposure ADaM","text":"function derive_vars_dt() can used derive ADT. function allows user impute date well. Example calls: next examples demonstrates datetime imputation features available derive_vars_dtm() function, time imputed “00:00:00”: example imputes start date first first day month imputes end date last day month. Please see Date Time Imputation additional examples calculating imputing analysis dates. Next, analysis study days can derived:","code":"adex <- derive_vars_dt(adex, new_vars_prefix = \"AST\", dtc = EXSTDTC) adex <- derive_vars_dt(adex, new_vars_prefix = \"AEN\", dtc = EXENDTC) adex <- derive_vars_dtm( adex, dtc = EXSTDTC, highest_imputation = \"M\", new_vars_prefix = \"AST\" ) adex <- derive_vars_dtm( adex, dtc = EXENDTC, highest_imputation = \"M\", date_imputation = \"last\", new_vars_prefix = \"AEN\" ) adex <- derive_vars_dy(adex, reference_date = TRTSDT, source_vars = exprs(ASTDT, AENDT) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"duration","dir":"Articles","previous_headings":"Programming Workflow","what":"Compute duration for a record","title":"Creating a BDS Exposure ADaM","text":"compute duration treatment exposure record, derive_vars_duration() function can used. units calculated duration can also changed. example, duration output years: Please refer derive_vars_duration() documentation detailed information input parameters. may necessary calculate additional intermediate values. example, cumulative doses received cumulative planned doses may calculated : may additional interest turn single record containing dosing summary information set multiple single records, representing single dose interval specified summary record. another approach deriving total dose parameter EXDOSFRQ != . function create_single_dose_dataset() can used expand record containing start date, end date, dosing frequency corresponding set records representing one dose (.e. EXDOSFRQ == \"\").","code":"adex <- adex %>% derive_vars_duration( new_var = EXDURD, start_date = ASTDT, end_date = AENDT ) adex <- adex %>% derive_vars_duration( new_var = EXDURDY, out_unit = \"years\", start_date = ASTDT, end_date = AENDT ) adex <- adex %>% mutate( DOSEO = EXDOSE * EXDURD, PDOSEO = EXPLDOS * EXDURD ) single_dose <- adex %>% filter(USUBJID == \"01-701-1015\" & EXSTDY == 1) %>% create_single_dose_dataset(keep_source_vars = exprs(USUBJID, EXDOSE, EXPLDOS, EXDOSFRQ, ASTDT, AENDT))"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"onetoone","dir":"Articles","previous_headings":"Programming Workflow","what":"Create 1:1 mapping records","title":"Creating a BDS Exposure ADaM","text":"first set exposure records create records mapped 1:1 existing collected exposure record SDTM. records, AVAL AVALC calculated using columns exist data summarizing records necessary. records may used input summary records used individually summarization outputs. examples may exposure duration, dose administered, dose adjusted, etc. based one exposure record SDTM. records can derived using simple dplyr::mutate assignments combined:","code":"adex_durd <- adex %>% mutate( PARAMCD = \"DURD\", AVAL = EXDURD ) adex_dose <- adex %>% mutate( PARAMCD = \"DOSE\", AVAL = DOSEO ) adex_pldos <- adex %>% mutate( PARAMCD = \"PLDOSE\", AVAL = PDOSEO ) adex_adj <- adex %>% mutate( PARAMCD = \"ADJ\", AVALC = if_else(!is.na(EXADJ), \"Y\", NA_character_) ) adex_adjae <- adex %>% mutate( PARAMCD = \"ADJAE\", AVALC = if_else(EXADJ == \"ADVERSE EVENT\", \"Y\", NA_character_) ) adex <- bind_rows( adex_durd, adex_dose, adex_pldos, adex_adj, adex_adjae ) %>% mutate(PARCAT1 = \"INDIVIDUAL\") count(adex, PARAMCD) #> # A tibble: 5 × 2 #> PARAMCD n #> #> 1 ADJ 13 #> 2 ADJAE 13 #> 3 DOSE 13 #> 4 DURD 13 #> 5 PLDOSE 13"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"summaryrec","dir":"Articles","previous_headings":"Programming Workflow","what":"Create Summary Records","title":"Creating a BDS Exposure ADaM","text":"Exposure commonly analyzed timing interval (e.g. APHASE, APERIOD, AVISIT, etc.). types calculations, derive_param_exposure() function may used. addition creating summarized AVAL, function also compute minimum maximum dates record. example, calculate total dose subject treatment, record PARAMCD == \"TDOSE\" created PARCAT1 set \"OVERALL\" using records ADEX PARAMCD == \"DOSE\" summing AVAL. addition, ASTDT, AENDT created minimum maximum date/times associated by_vars grouping. Note , addition PARAMCD, PARCAT1, AVAL, ASTDT AENDT, variables specified by_vars argument populated new records. Multiple parameters (records) may created one time using call_derivation() function: Dose intensity can calculated using function derive_param_doseint(). planned dose administered dose passed function new record created dose intensity calculation. , variables specified by_vars argument populated new record. default calculation dose intensity : Administered Doses / Planned Doses * 100. Please see derive_param_doseint() documentation see planned doses 0 NA handled.","code":"adex <- derive_param_exposure( adex, dataset_add = adex, by_vars = c(get_admiral_option(\"subject_keys\"), adsl_vars), input_code = \"DOSE\", set_values_to = exprs( PARAMCD = \"TDOSE\", PARCAT1 = \"OVERALL\", AVAL = sum(AVAL, na.rm = TRUE) ) ) adex <- adex %>% call_derivation( derivation = derive_param_exposure, variable_params = list( params( set_values_to = exprs( PARAMCD = \"TDOSE\", PARCAT1 = \"OVERALL\", AVAL = sum(AVAL, na.rm = TRUE) ), input_code = \"DOSE\" ), params( set_values_to = exprs( PARAMCD = \"TPDOSE\", PARCAT1 = \"OVERALL\", AVAL = sum(AVAL, na.rm = TRUE) ), input_code = \"PLDOSE\" ), params( set_values_to = exprs( PARAMCD = \"TDURD\", PARCAT1 = \"OVERALL\", AVAL = sum(AVAL, na.rm = TRUE) ), input_code = \"DURD\" ), params( set_values_to = exprs( PARAMCD = \"TADJ\", PARCAT1 = \"OVERALL\", AVALC = if_else(sum(!is.na(AVALC)) > 0, \"Y\", NA_character_) ), input_code = \"ADJ\" ), params( set_values_to = exprs( PARAMCD = \"TADJAE\", PARCAT1 = \"OVERALL\", AVALC = if_else(sum(!is.na(AVALC)) > 0, \"Y\", NA_character_) ), input_code = \"ADJAE\" ) ), dataset_add = adex, by_vars = c(get_admiral_option(\"subject_keys\"), adsl_vars) ) count(adex, PARAMCD, PARCAT1) #> # A tibble: 10 × 3 #> PARAMCD PARCAT1 n #> #> 1 ADJ INDIVIDUAL 13 #> 2 ADJAE INDIVIDUAL 13 #> 3 DOSE INDIVIDUAL 13 #> 4 DURD INDIVIDUAL 13 #> 5 PLDOSE INDIVIDUAL 13 #> 6 TADJ OVERALL 6 #> 7 TADJAE OVERALL 6 #> 8 TDOSE OVERALL 6 #> 9 TDURD OVERALL 6 #> 10 TPDOSE OVERALL 6 adex <- adex %>% derive_param_doseint( by_vars = c(get_admiral_option(\"subject_keys\"), adsl_vars), set_values_to = exprs(PARAMCD = \"TNDOSINT\"), tadm_code = \"TDOSE\", tpadm_code = \"TPDOSE\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"paramcd","dir":"Articles","previous_headings":"Programming Workflow","what":"Assign PARAMCD, PARAMN, etc. from Reference tables","title":"Creating a BDS Exposure ADaM","text":"assign parameter level values PARAM, PARAMN, PARCAT1, etc., lookup can created join source data. example, creating ADEX, lookup based ADaM PARAMCD value may created: Please note, example additional columns may needed join depending lookup/metadata table.","code":"adex <- derive_vars_merged( adex, dataset_add = param_lookup, by_vars = exprs(PARAMCD) ) count(adex, PARAMCD, PARAM, PARAMN) #> # A tibble: 11 × 4 #> PARAMCD PARAM PARAMN n #> #> 1 ADJ Dose adjusted during constant dosing interval 4 13 #> 2 ADJAE Dose adjusted due to AE during constant dosing interv… 5 13 #> 3 DOSE Dose administered during constant dosing interval (mg) 2 13 #> 4 DURD Study drug duration during constant dosing interval (d… 1 13 #> 5 PLDOSE Planned dose during constant dosing interval (mg) 3 13 #> 6 TADJ Dose adjusted during study 10 6 #> 7 TADJAE Dose adjusted during study due to AE 11 6 #> 8 TDOSE Total dose administered (mg) 7 6 #> 9 TDURD Overall duration (days) 6 6 #> 10 TNDOSINT Overall dose intensity (%) 12 6 #> 11 TPDOSE Total planned dose (mg) 9 6"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"cat","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Categorization Variables (AVALCATy)","title":"Creating a BDS Exposure ADaM","text":"can use derive_vars_cat() function derive categorization variables.","code":"avalcax_lookup <- exprs( ~PARAMCD, ~condition, ~AVALCAT1, \"TDURD\", AVAL >= 90, \">= 90 days\", \"TDURD\", AVAL >= 30 & AVAL < 90, \">= 30 and < 90 days\", \"TDURD\", AVAL < 30, \"< 30 days\", \"TDOSE\", AVAL < 1000, \"< 1000 mg\", \"TDOSE\", AVAL >= 1000, \">= 1000 mg\", \"TPDOSE\", AVAL < 1000, \"< 1000 mg\", \"TPDOSE\", AVAL >= 1000, \">= 1000 mg\" ) adex <- adex %>% derive_vars_cat( definition = avalcax_lookup, by_vars = exprs(PARAMCD) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"aseq","dir":"Articles","previous_headings":"Programming Workflow","what":"Assign ASEQ","title":"Creating a BDS Exposure ADaM","text":"admiral function derive_var_obs_number() can used derive ASEQ. example call :","code":"adex <- derive_var_obs_number( adex, new_var = ASEQ, by_vars = get_admiral_option(\"subject_keys\"), order = exprs(PARCAT1, ASTDT, VISIT, VISITNUM, EXSEQ, PARAMN), check_type = \"error\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"adsl_vars","dir":"Articles","previous_headings":"Programming Workflow","what":"Add the ADSL variables","title":"Creating a BDS Exposure ADaM","text":"needed, ADSL variables can now added:","code":"adex <- adex %>% derive_vars_merged( dataset_add = select(adsl, !!!negate_vars(adsl_vars)), by_vars = get_admiral_option(\"subject_keys\") )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_exposure.html","id":"attributes","dir":"Articles","previous_headings":"Programming Workflow","what":"Add Labels and Attributes","title":"Creating a BDS Exposure ADaM","text":"Adding labels attributes SAS transport files supported following packages: metacore: establish common foundation use metadata within R session. metatools: enable use metacore objects. Metatools can used build datasets enhance columns existing datasets well checking datasets metadata. xportr: functionality associate metadata information local R data frame, perform data set level validation checks convert transport v5 file(xpt). NOTE: packages experimental phase, vision associated End End pipeline umbrella pharmaverse. example applying metadata perform associated checks can found pharmaverse E2E example.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Creating a BDS Finding ADaM","text":"article describes creating BDS finding ADaM. Examples currently presented tested context ADVS. However, examples applied BDS Finding ADaMs ADEG, ADLB, etc. single result captured SDTM Finding domain single date /time. Note: examples assume CDISC SDTM /ADaM format input unless otherwise specified.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"programming-workflow","dir":"Articles","previous_headings":"","what":"Programming Workflow","title":"Creating a BDS Finding ADaM","text":"Read Data Derive/Impute Numeric Date/Time Analysis Day (ADT, ADTM, ADY, ADTF, ATMF) Assign PARAMCD, PARAM, PARAMN, PARCAT1 Derive Results (AVAL, AVALC) Derive Additional Parameters (e.g. BSA, BMI, MAP ADVS) Derive Timing Variables (e.g. APHASE, AVISIT, APERIOD) Timing Flag Variables (e.g. ONTRTFL) Assign Reference Range Indicator (ANRIND) Derive Baseline (BASETYPE, ABLFL, BASE, BASEC, BNRIND) Derive Change Baseline (CHG, PCHG) Derive Shift (e.g.SHIFT1) Derive Analysis Ratio (e.g. R2BASE) Derive Analysis Flags (e.g. ANL01FL) Assign Treatment (TRTA, TRTP) Assign ASEQ Derive Categorization Variables (AVALCATy) Derive Criterion Variables (CRITy, CRITyFL, CRITyFN) Add ADSL variables Derive New Rows Add Labels Attributes","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"readdata","dir":"Articles","previous_headings":"Programming Workflow","what":"Read in Data","title":"Creating a BDS Finding ADaM","text":"start, data frames needed creation ADVS read environment. company specific process. data frames needed may VS ADSL. example purpose, CDISC Pilot SDTM ADaM datasets—included pharmaversesdtm—used. step, may useful join ADSL VS domain. ADSL variables used derivations selected step. rest relevant ADSL variables added later.","code":"library(admiral) library(dplyr, warn.conflicts = FALSE) library(pharmaversesdtm) library(lubridate) library(stringr) library(tibble) vs <- pharmaversesdtm::vs adsl <- admiral::admiral_adsl vs <- convert_blanks_to_na(vs) adsl_vars <- exprs(TRTSDT, TRTEDT, TRT01A, TRT01P) advs <- derive_vars_merged( vs, dataset_add = adsl, new_vars = adsl_vars, by_vars = exprs(STUDYID, USUBJID) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"datetime","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive/Impute Numeric Date/Time and Analysis Day (ADT, ADTM, ADY, ADTF, ATMF)","title":"Creating a BDS Finding ADaM","text":"function derive_vars_dt() can used derive ADT. function allows user impute date well. Example calls: imputation needed date imputed first month, call : Similarly, ADTM may created using function derive_vars_dtm(). Imputation may done date time components ADTM. default, variable ADTF derive_vars_dt() ADTF ATMF derive_vars_dtm() created populated controlled terminology outlined ADaM IG date imputations. See also Date Time Imputation. ADT derived, function derive_vars_dy() can used derive ADY. example assumes ADT TRTSDT exist data frame.","code":"advs <- derive_vars_dt(advs, new_vars_prefix = \"A\", dtc = VSDTC) advs <- derive_vars_dt( advs, new_vars_prefix = \"A\", dtc = VSDTC, highest_imputation = \"M\" ) # CDISC Pilot data does not contain times and the output of the derivation # ADTM is not presented. advs <- derive_vars_dtm( advs, new_vars_prefix = \"A\", dtc = VSDTC, highest_imputation = \"M\" ) advs <- derive_vars_dy(advs, reference_date = TRTSDT, source_vars = exprs(ADT))"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"paramcd","dir":"Articles","previous_headings":"Programming Workflow","what":"Assign PARAMCD, PARAM, PARAMN, PARCAT1","title":"Creating a BDS Finding ADaM","text":"assign parameter level values PARAMCD, PARAM, PARAMN, PARCAT1, etc., lookup can created join source data. example, creating ADVS, lookup based SDTM --TESTCD value may created: lookup may now joined source data: stage, PARAMCD required perform derivations. Additional derived parameters may added, PARAMCD joined datasets point. variables related PARAMCD (e.g. PARAM, PARAMCAT1, …) added PARAMCD derived. Please note, may necessary include variables join. example, perhaps PARAMCD based VSTESTCD VSPOS, may necessary expand lookup create separate look PARAMCD. one lookup table, e.g., company parameter mappings project parameter mappings, available, consolidate_metadata() can used consolidate single lookup table.","code":"advs <- derive_vars_merged_lookup( advs, dataset_add = param_lookup, new_vars = exprs(PARAMCD), by_vars = exprs(VSTESTCD) ) #> All `VSTESTCD` are mapped."},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"aval","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Results (AVAL, AVALC)","title":"Creating a BDS Finding ADaM","text":"mapping AVAL AVALC left ADaM programmer. example mapping may : example, often case ADVS, AVAL values numeric without corresponding non-redundant text value AVALC. Per recommendation ADaMIG v1.3 map AVALC.","code":"advs <- mutate( advs, AVAL = VSSTRESN )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"derive_param","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Additional Parameters (e.g. BSA, BMI or MAP for ADVS)","title":"Creating a BDS Finding ADaM","text":"Optionally derive new parameters creating PARAMCD AVAL. Note variables specified by_vars argument populated newly created records. relevant functions derive_param_map, derive_param_bsa, derive_param_bmi, derive_param_qtc. example creating Mean Arterial Pressure ADVS, see also Example 3 section Derive New Rows alternative way creating new parameters. Likewise, function call , create parameter Body Surface Area (BSA) Body Mass Index (BMI) ADVS domain. Note height collected use constant_by_vars specify subject-level variable merge . Otherwise BSA BMI calculated visits collected. Similarly, ADEG, parameters QTCBF QTCBS QTCL can created function call. See example PARAMCD = QTCF. Similarly, ADLB, function derive_param_wbc_abs() can used create new parameter lab differentials converted absolute values. See example : PARAMCD derived added dataset, information look-table (PARAM, PARAMCAT1,…) added.","code":"advs <- derive_param_map( advs, by_vars = exprs(STUDYID, USUBJID, !!!adsl_vars, VISIT, VISITNUM, ADT, ADY, VSTPT, VSTPTNUM), set_values_to = exprs(PARAMCD = \"MAP\"), get_unit_expr = VSSTRESU, filter = VSSTAT != \"NOT DONE\" | is.na(VSSTAT) ) advs <- derive_param_bsa( advs, by_vars = exprs(STUDYID, USUBJID, !!!adsl_vars, VISIT, VISITNUM, ADT, ADY, VSTPT, VSTPTNUM), method = \"Mosteller\", set_values_to = exprs(PARAMCD = \"BSA\"), get_unit_expr = VSSTRESU, filter = VSSTAT != \"NOT DONE\" | is.na(VSSTAT), constant_by_vars = exprs(USUBJID) ) advs <- derive_param_bmi( advs, by_vars = exprs(STUDYID, USUBJID, !!!adsl_vars, VISIT, VISITNUM, ADT, ADY, VSTPT, VSTPTNUM), set_values_to = exprs(PARAMCD = \"BMI\"), get_unit_expr = VSSTRESU, filter = VSSTAT != \"NOT DONE\" | is.na(VSSTAT), constant_by_vars = exprs(USUBJID) ) adeg <- tibble::tribble( ~USUBJID, ~EGSTRESU, ~PARAMCD, ~AVAL, ~VISIT, \"P01\", \"msec\", \"QT\", 350, \"CYCLE 1 DAY 1\", \"P01\", \"msec\", \"QT\", 370, \"CYCLE 2 DAY 1\", \"P01\", \"msec\", \"RR\", 842, \"CYCLE 1 DAY 1\", \"P01\", \"msec\", \"RR\", 710, \"CYCLE 2 DAY 1\" ) adeg <- derive_param_qtc( adeg, by_vars = exprs(USUBJID, VISIT), method = \"Fridericia\", set_values_to = exprs(PARAMCD = \"QTCFR\"), get_unit_expr = EGSTRESU ) adlb <- tibble::tribble( ~USUBJID, ~PARAMCD, ~AVAL, ~PARAM, ~VISIT, \"P01\", \"WBC\", 33, \"Leukocyte Count (10^9/L)\", \"CYCLE 1 DAY 1\", \"P01\", \"WBC\", 38, \"Leukocyte Count (10^9/L)\", \"CYCLE 2 DAY 1\", \"P01\", \"LYMLE\", 0.90, \"Lymphocytes (fraction of 1)\", \"CYCLE 1 DAY 1\", \"P01\", \"LYMLE\", 0.70, \"Lymphocytes (fraction of 1)\", \"CYCLE 2 DAY 1\" ) derive_param_wbc_abs( dataset = adlb, by_vars = exprs(USUBJID, VISIT), set_values_to = exprs( PARAMCD = \"LYMPH\", PARAM = \"Lymphocytes Abs (10^9/L)\", DTYPE = \"CALCULATION\" ), get_unit_expr = extract_unit(PARAM), wbc_code = \"WBC\", diff_code = \"LYMLE\", diff_type = \"fraction\" ) # Derive PARAM and PARAMN advs <- derive_vars_merged( advs, dataset_add = select(param_lookup, -VSTESTCD), by_vars = exprs(PARAMCD) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"timing","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Timing Variables (e.g. APHASE, AVISIT, APERIOD)","title":"Creating a BDS Finding ADaM","text":"Categorical timing variables protocol analysis dependent. simple example. assigning visits based time windows deriving periods, subperiods, phase variables see “Visit Period Variables” vignette.","code":"advs <- advs %>% mutate( AVISIT = case_when( str_detect(VISIT, \"SCREEN\") ~ NA_character_, str_detect(VISIT, \"UNSCHED\") ~ NA_character_, str_detect(VISIT, \"RETRIEVAL\") ~ NA_character_, str_detect(VISIT, \"AMBUL\") ~ NA_character_, !is.na(VISIT) ~ str_to_title(VISIT) ), AVISITN = as.numeric(case_when( VISIT == \"BASELINE\" ~ \"0\", str_detect(VISIT, \"WEEK\") ~ str_trim(str_replace(VISIT, \"WEEK\", \"\")) )), ATPT = VSTPT, ATPTN = VSTPTNUM ) count(advs, VISITNUM, VISIT, AVISITN, AVISIT) #> # A tibble: 15 × 5 #> VISITNUM VISIT AVISITN AVISIT n #> #> 1 1 SCREENING 1 NA NA 102 #> 2 2 SCREENING 2 NA NA 78 #> 3 3 BASELINE 0 Baseline 96 #> 4 3.5 AMBUL ECG PLACEMENT NA NA 65 #> 5 4 WEEK 2 2 Week 2 96 #> 6 5 WEEK 4 4 Week 4 80 #> 7 6 AMBUL ECG REMOVAL NA NA 52 #> 8 7 WEEK 6 6 Week 6 48 #> 9 8 WEEK 8 8 Week 8 48 #> 10 9 WEEK 12 12 Week 12 48 #> 11 10 WEEK 16 16 Week 16 48 #> 12 11 WEEK 20 20 Week 20 32 #> 13 12 WEEK 24 24 Week 24 32 #> 14 13 WEEK 26 26 Week 26 32 #> 15 201 RETRIEVAL NA NA 26 count(advs, VSTPTNUM, VSTPT, ATPTN, ATPT) #> # A tibble: 4 × 5 #> VSTPTNUM VSTPT ATPTN ATPT n #> #> 1 815 AFTER LYING DOWN FOR 5 MINUTES 815 AFTER LYING DOWN FOR 5 MI… 232 #> 2 816 AFTER STANDING FOR 1 MINUTE 816 AFTER STANDING FOR 1 MINU… 232 #> 3 817 AFTER STANDING FOR 3 MINUTES 817 AFTER STANDING FOR 3 MINU… 232 #> 4 NA NA NA NA 187"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"timingflag","dir":"Articles","previous_headings":"Programming Workflow","what":"Timing Flag Variables (e.g. ONTRTFL)","title":"Creating a BDS Finding ADaM","text":"analyses, may necessary flag observation -treatment. admiral function derive_var_ontrtfl() can used. example, -treatment defined observation treatment start treatment end, flag may derived : function returns original data frame column ONTRTFL added. Additionally, function functionality handle window ref_end_date. example, -treatment defined treatment start treatment end plus 60 days, call : addition, function allow filter pre-treatment observations occurred start date. example, observations VSTPT == PRE considered -treatment observation date falls treatment start end date, user may specify using filter_pre_timepoint parameter: Lastly, function allow create -treatment flag based analysis needs. example, variable ONTR01FL needed, showing -treatment flag Period 01, need set new var = ONTR01FL. addition, Period 01 Start Date Period 01 End Date, need ref_start_date = AP01SDT ref_end_date = AP01EDT.","code":"advs <- derive_var_ontrtfl( advs, start_date = ADT, ref_start_date = TRTSDT, ref_end_date = TRTEDT ) advs <- derive_var_ontrtfl( advs, start_date = ADT, ref_start_date = TRTSDT, ref_end_date = TRTEDT, ref_end_window = 60 ) advs <- derive_var_ontrtfl( advs, start_date = ADT, ref_start_date = TRTSDT, ref_end_date = TRTEDT, filter_pre_timepoint = ATPT == \"AFTER LYING DOWN FOR 5 MINUTES\" ) advs <- derive_var_ontrtfl( advs, new_var = ONTR01FL, start_date = ASTDT, end_date = AENDT, ref_start_date = AP01SDT, ref_end_date = AP01EDT, span_period = TRUE )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"referencerange","dir":"Articles","previous_headings":"Programming Workflow","what":"Assign Reference Range Indicator (ANRIND)","title":"Creating a BDS Finding ADaM","text":"admiral function derive_var_anrind() may used derive reference range indicator ANRIND. function requires reference range boundaries exist data frame (ANRLO, ANRHI) also accommodates additional boundaries A1LO A1HI. function called :","code":"advs <- derive_var_anrind(advs)"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"baseline","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Baseline (BASETYPE, ABLFL, BASE, BNRIND)","title":"Creating a BDS Finding ADaM","text":"BASETYPE derived using function derive_basetype_records(). parameter basetypes function requires named list expression detailing BASETYPE assigned. Note, record falls multiple expressions within basetypes expression, row produced BASETYPE. important derive BASETYPE first can utilized subsequent derivations. important data frame contains multiple values BASETYPE. Next, analysis baseline flag ABLFL can derived using admiral function derive_var_extreme_flag(). example, baseline defined last non-missing AVAL prior TRTSDT, function call ABLFL : Note: Additional examples derive_var_extreme_flag() function can found . Lastly, BASE, BNRIND columns can derived using admiral function derive_var_base(). Example calls :","code":"advs <- derive_basetype_records( dataset = advs, basetypes = exprs( \"LAST: AFTER LYING DOWN FOR 5 MINUTES\" = ATPTN == 815, \"LAST: AFTER STANDING FOR 1 MINUTE\" = ATPTN == 816, \"LAST: AFTER STANDING FOR 3 MINUTES\" = ATPTN == 817, \"LAST\" = is.na(ATPTN) ) ) count(advs, ATPT, ATPTN, BASETYPE) #> # A tibble: 4 × 4 #> ATPT ATPTN BASETYPE n #> #> 1 AFTER LYING DOWN FOR 5 MINUTES 815 LAST: AFTER LYING DOWN FOR 5 MINUT… 232 #> 2 AFTER STANDING FOR 1 MINUTE 816 LAST: AFTER STANDING FOR 1 MINUTE 232 #> 3 AFTER STANDING FOR 3 MINUTES 817 LAST: AFTER STANDING FOR 3 MINUTES 232 #> 4 NA NA LAST 187 advs <- restrict_derivation( advs, derivation = derive_var_extreme_flag, args = params( by_vars = exprs(STUDYID, USUBJID, BASETYPE, PARAMCD), order = exprs(ADT, ATPTN, VISITNUM), new_var = ABLFL, mode = \"last\" ), filter = (!is.na(AVAL) & ADT <= TRTSDT & !is.na(BASETYPE)) ) advs <- derive_var_base( advs, by_vars = exprs(STUDYID, USUBJID, PARAMCD, BASETYPE), source_var = AVAL, new_var = BASE ) advs <- derive_var_base( advs, by_vars = exprs(STUDYID, USUBJID, PARAMCD, BASETYPE), source_var = ANRIND, new_var = BNRIND )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"bchange","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Change from Baseline (CHG, PCHG)","title":"Creating a BDS Finding ADaM","text":"Change percent change baseline can derived using admiral functions derive_var_chg() derive_var_pchg(). functions expect AVAL BASE exist data frame. CHG simply AVAL - BASE PCHG (AVAL - BASE) / absolute value (BASE) * 100. Examples calls : variables derived records, e.g., post-baseline records , restrict_derivation() can used.","code":"advs <- derive_var_chg(advs) advs <- derive_var_pchg(advs)"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"shift","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Shift (e.g. SHIFT1)","title":"Creating a BDS Finding ADaM","text":"Shift variables can derived using admiral function derive_var_shift(). function derives character shift variable concatenating shift values based user-defined pairing, e.g., shift baseline reference range BNRIND analysis reference range ANRIND. Examples calls : variables derived records, e.g., post-baseline records , restrict_derivation() can used.","code":"advs <- derive_var_shift(advs, new_var = SHIFT1, from_var = BNRIND, to_var = ANRIND )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"analysisratio","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Analysis Ratio (R2BASE)","title":"Creating a BDS Finding ADaM","text":"Analysis ratio variables can derived using admiral function derive_var_analysis_ratio(). function derives ratio variable based user-specified pair. example, Ratio Baseline calculated AVAL / BASE function appends new variable R2BASE dataset. Examples calls : variables derived records, e.g., post-baseline records , restrict_derivation() can used.","code":"advs <- derive_var_analysis_ratio(advs, numer_var = AVAL, denom_var = BASE ) advs <- derive_var_analysis_ratio(advs, numer_var = AVAL, denom_var = ANRLO, new_var = R01ANRLO )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"analysisrec","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Analysis Flags (e.g. ANL01FL)","title":"Creating a BDS Finding ADaM","text":"finding ADaMs, analysis flag derived identify appropriate observation(s) use particular analysis subject multiple observations within particular timing period. situation, analysis flag (e.g. ANLxxFL) may used choose appropriate record analysis. flag may derived using admiral function derive_var_extreme_flag(). example, assume like choose latest highest value USUBJID, PARAMCD, AVISIT, ATPT. Another common example flagging worst value subject, parameter, visit. example, assume 3 PARAMCD values (SYSBP, DIABP, RESP). also assume high worst SYSBP DIABP low worst RESP.","code":"advs <- restrict_derivation( advs, derivation = derive_var_extreme_flag, args = params( by_vars = exprs(STUDYID, USUBJID, BASETYPE, PARAMCD, AVISIT), order = exprs(ADT, ATPTN, AVAL), new_var = ANL01FL, mode = \"last\" ), filter = !is.na(AVISITN) ) advs <- slice_derivation( advs, derivation = derive_var_extreme_flag, args = params( by_vars = exprs(STUDYID, USUBJID, BASETYPE, PARAMCD, AVISIT), order = exprs(ADT, ATPTN), new_var = WORSTFL, mode = \"first\" ), derivation_slice( filter = PARAMCD %in% c(\"SYSBP\", \"DIABP\") & (!is.na(AVISIT) & !is.na(AVAL)) ), derivation_slice( filter = PARAMCD %in% \"PULSE\" & (!is.na(AVISIT) & !is.na(AVAL)), args = params(mode = \"last\") ) ) %>% arrange(STUDYID, USUBJID, BASETYPE, PARAMCD, AVISIT)"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"treatment","dir":"Articles","previous_headings":"Programming Workflow","what":"Assign Treatment (TRTA, TRTP)","title":"Creating a BDS Finding ADaM","text":"TRTA TRTP must match least one value character treatment variables ADSL (e.g., TRTxxA/TRTxxP, TRTSEQA/TRTSEQP, TRxxAGy/TRxxPGy). example simple implementation study without periods : studies periods see “Visit Period Variables” vignette.","code":"advs <- mutate(advs, TRTP = TRT01P, TRTA = TRT01A) count(advs, TRTP, TRTA, TRT01P, TRT01A) #> # A tibble: 2 × 5 #> TRTP TRTA TRT01P TRT01A n #> #> 1 Placebo Placebo Placebo Placebo 640 #> 2 Xanomeline Low Dose Xanomeline Low Dose Xanomeline Low Dose Xanomeline … 243"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"aseq","dir":"Articles","previous_headings":"Programming Workflow","what":"Assign ASEQ","title":"Creating a BDS Finding ADaM","text":"admiral function derive_var_obs_number() can used derive ASEQ. example call :","code":"advs <- derive_var_obs_number( advs, new_var = ASEQ, by_vars = exprs(STUDYID, USUBJID), order = exprs(PARAMCD, ADT, AVISITN, VISITNUM, ATPTN), check_type = \"error\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"cat","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Categorization Variables (AVALCATy)","title":"Creating a BDS Finding ADaM","text":"can use derive_vars_cat() function derive categorization variables.","code":"avalcat_lookup <- exprs( ~PARAMCD, ~condition, ~AVALCAT1, ~AVALCA1N, \"HEIGHT\", AVAL > 140, \">140 cm\", 1, \"HEIGHT\", AVAL <= 140, \"<= 140 cm\", 2 ) advs <- advs %>% derive_vars_cat( definition = avalcat_lookup, by_vars = exprs(PARAMCD) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"crit_vars","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Criterion Variables (CRITy, CRITyFL, CRITyFN)","title":"Creating a BDS Finding ADaM","text":"deriving criterion variables (CRITy, CRITyFL, CRITyFN) admiral provides derive_vars_crit_flag(). ensures derived ADaM-compliant way (see documentation function details). cases criterion depends parameter. higher order functions restrict_derivation() slice_derivation() useful case. following example criterion flags systolic diastolic blood pressure ADaM IG derived. first criterion based AVAL derived systolic diastolic blood pressure. slice_derivation() us used specify condition description criterion depending parameter. second criterion based AVAL CHG derived systolic blood pressure . Thus restrict_derivation() used.","code":"advs <- advs %>% slice_derivation( derivation = derive_vars_crit_flag, args = params( values_yn = TRUE, create_numeric_flag = TRUE ), derivation_slice( filter = PARAMCD == \"SYSBP\", args = params( condition = AVAL > 160, description = \"Systolic Pressure > 160\" ) ), derivation_slice( filter = PARAMCD == \"DIABP\", args = params( condition = AVAL > 95, description = \"Diastolic Pressure > 95\" ) ) ) advs <- advs %>% restrict_derivation( derivation = derive_vars_crit_flag, args = params( condition = AVAL > 160 & CHG > 10, description = \"Systolic Pressure > 160 and Change from Baseline in Systolic Pressure > 10\", crit_nr = 2, values_yn = TRUE, create_numeric_flag = TRUE ), filter = PARAMCD == \"SYSBP\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"adsl_vars","dir":"Articles","previous_headings":"Programming Workflow","what":"Add ADSL variables","title":"Creating a BDS Finding ADaM","text":"needed, ADSL variables can now added. List ADSL variables already merged held vector adsl_vars","code":"advs <- advs %>% derive_vars_merged( dataset_add = select(adsl, !!!negate_vars(adsl_vars)), by_vars = exprs(STUDYID, USUBJID) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"additional","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive New Rows","title":"Creating a BDS Finding ADaM","text":"deriving new rows data frame, essential programmer takes time insert derivation correct location code. location vary depending previous computations retained new record computations must done new records.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"example-1-creating-a-new-record","dir":"Articles","previous_headings":"Programming Workflow > Derive New Rows","what":"Example 1 (Creating a New Record):","title":"Creating a BDS Finding ADaM","text":"add new record based selection certain criterion (e.g. minimum, maximum) derive_extreme_records() can used. new records include variables selected records.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"adding-a-new-record-for-the-last-value","dir":"Articles","previous_headings":"Programming Workflow > Derive New Rows > Example 1 (Creating a New Record):","what":"Adding a New Record for the Last Value","title":"Creating a BDS Finding ADaM","text":"subject Vital Signs parameter, add record holding last valid observation end treatment. Set AVISIT \"End Treatment\" assign unique AVISITN value.","code":"advs_ex1 <- advs %>% derive_extreme_records( dataset_add = advs, by_vars = exprs(STUDYID, USUBJID, PARAMCD), order = exprs(ADT, AVISITN, ATPTN, AVAL), mode = \"last\", filter_add = (4 < AVISITN & AVISITN <= 12 & ANL01FL == \"Y\"), set_values_to = exprs( AVISIT = \"End of Treatment\", AVISITN = 99, DTYPE = \"LOV\" ) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"adding-a-new-record-for-the-minimum-value","dir":"Articles","previous_headings":"Programming Workflow > Derive New Rows > Example 1 (Creating a New Record):","what":"Adding a New Record for the Minimum Value","title":"Creating a BDS Finding ADaM","text":"subject Vital Signs parameter, add record holding minimum value end treatment. minimum attained multiple observations first one selected. Set AVISIT \"Minimum Treatment\" assign unique AVISITN value.","code":"advs_ex1 <- advs %>% derive_extreme_records( dataset_add = advs, by_vars = exprs(STUDYID, USUBJID, PARAMCD), order = exprs(AVAL, ADT, AVISITN, ATPTN), mode = \"first\", filter_add = (4 < AVISITN & AVISITN <= 12 & ANL01FL == \"Y\" & !is.na(AVAL)), set_values_to = exprs( AVISIT = \"Minimum on Treatment\", AVISITN = 98, DTYPE = \"MINIMUM\" ) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"example-2-deriving-a-summary-record","dir":"Articles","previous_headings":"Programming Workflow > Derive New Rows","what":"Example 2 (Deriving a Summary Record)","title":"Creating a BDS Finding ADaM","text":"adding new records based aggregating records derive_summary_records() can used. new records variables specified by_vars set_values_to populated. subject, Vital Signs parameter, visit, date add record holding average value observations date. Set DTYPE AVERAGE.","code":"advs_ex2 <- derive_summary_records( advs, dataset_add = advs, by_vars = exprs(STUDYID, USUBJID, PARAMCD, VISITNUM, ADT), set_values_to = exprs( AVAL = mean(AVAL, na.rm = TRUE), DTYPE = \"AVERAGE\" ) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"example-3-deriving-a-new-paramcd","dir":"Articles","previous_headings":"Programming Workflow > Derive New Rows","what":"Example 3 (Deriving a New PARAMCD)","title":"Creating a BDS Finding ADaM","text":"Use function derive_param_computed() create new PARAMCD. Note variables specified by_vars argument populated newly created records. example creating Mean Arterial Pressure (PARAMCD = MAP2) alternative formula.","code":"advs_ex3 <- derive_param_computed( advs, by_vars = exprs(USUBJID, VISIT, ATPT), parameters = c(\"SYSBP\", \"DIABP\"), set_values_to = exprs( AVAL = (AVAL.SYSBP - AVAL.DIABP) / 3 + AVAL.DIABP, PARAMCD = \"MAP2\", PARAM = \"Mean Arterial Pressure 2 (mmHg)\" ) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_finding.html","id":"attributes","dir":"Articles","previous_headings":"Programming Workflow","what":"Add Labels and Attributes","title":"Creating a BDS Finding ADaM","text":"Adding labels attributes SAS transport files supported following packages: metacore: establish common foundation use metadata within R session. metatools: enable use metacore objects. Metatools can used build datasets enhance columns existing datasets well checking datasets metadata. xportr: functionality associate metadata information local R data frame, perform data set level validation checks convert transport v5 file(xpt). NOTE: packages experimental phase, vision associated End End pipeline umbrella pharmaverse. example applying metadata perform associated checks can found pharmaverse E2E example.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Creating a BDS Time-to-Event ADaM","text":"article describes creating BDS time--event ADaM. main part programming time--event dataset definition events censoring times. admiral supports single events like death composite events like disease progression death. one source dataset can used definition event censoring times. Note: examples assume CDISC SDTM /ADaM format input unless otherwise specified.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"required-packages","dir":"Articles","previous_headings":"Introduction","what":"Required Packages","title":"Creating a BDS Time-to-Event ADaM","text":"examples vignette require following packages.","code":"library(admiral) library(dplyr, warn.conflicts = FALSE) library(pharmaversesdtm)"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"programming-workflow","dir":"Articles","previous_headings":"","what":"Programming Workflow","title":"Creating a BDS Time-to-Event ADaM","text":"Read Data Derive Parameters (CNSR, ADT, STARTDT) Derive Analysis Value (AVAL) Derive Analysis Sequence Number (ASEQ) Add ADSL Variables Add Labels Attributes","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"readdata","dir":"Articles","previous_headings":"Programming Workflow","what":"Read in Data","title":"Creating a BDS Time-to-Event ADaM","text":"start, datasets needed creation time--event dataset read environment. company specific process. example purpose, ADSL dataset—included admiral—SDTM datasets pharmaversesdtm used. following code creates minimally viable ADAE dataset used throughout following examples.","code":"ae <- pharmaversesdtm::ae adsl <- admiral::admiral_adsl ae <- convert_blanks_to_na(ae) adae <- ae %>% left_join(adsl, by = c(\"STUDYID\", \"USUBJID\")) %>% derive_vars_dt( new_vars_prefix = \"AST\", dtc = AESTDTC, highest_imputation = \"M\" ) %>% derive_vars_dt( new_vars_prefix = \"AEN\", dtc = AEENDTC, highest_imputation = \"M\", date_imputation = \"last\" ) %>% mutate(TRTEMFL = if_else(ASTDT >= TRTSDT & AENDT <= TRTEDT + days(30), \"Y\", NA_character_))"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"parameters","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Parameters (CNSR, ADT, STARTDT)","title":"Creating a BDS Time-to-Event ADaM","text":"derive parameter dependent variables like CNSR, ADT, STARTDT, EVNTDESC, SRCDOM, PARAMCD, … derive_param_tte() function can used. adds one parameter input dataset one observation per subject. Usually called several times. subject determined event occurred. affirmative analysis date ADT set earliest event date. event occurred, analysis date set latest censoring date. events censorings defined event_source() censor_source() class respectively. defines observations (filter parameter) source dataset (dataset_name parameter) potential events censorings, value CNSR variable (censor parameter), variable provides date (date parameter). date can provided date (--DT variable) datetime (--DTM variable). CDISC strongly recommends CNSR = 0 events positive integers censorings. admiral enforces recommendation. Therefore censor parameter available censor_source() . defaulted 1. dataset_name parameter expects character value used identifier. actual data used derivation parameter provided via source_datasets parameter derive_param_tte(). expects named list datasets. names correspond identifiers specified dataset_name parameter. allows define events censoring independent data.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"pre-defined-time-to-event-source-objects","dir":"Articles","previous_headings":"Programming Workflow > Derive Parameters (CNSR, ADT, STARTDT)","what":"Pre-Defined Time-to-Event Source Objects","title":"Creating a BDS Time-to-Event ADaM","text":"table shows pre-defined tte_source objects cover common use cases. pre-defined objects can passed directly derive_param_tte() create new time--event parameter.","code":"adtte <- derive_param_tte( dataset_adsl = adsl, start_date = TRTSDT, event_conditions = list(ae_ser_event), censor_conditions = list(lastalive_censor), source_datasets = list(adsl = adsl, adae = adae), set_values_to = exprs(PARAMCD = \"TTAESER\", PARAM = \"Time to First Serious AE\") )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"single-event","dir":"Articles","previous_headings":"Programming Workflow > Derive Parameters (CNSR, ADT, STARTDT)","what":"Single Event","title":"Creating a BDS Time-to-Event ADaM","text":"example, overall survival time defined treatment start death. Patients alive lost follow-censored last alive date. following call defines death event based ADSL variables. corresponding censoring based last known alive date can defined following call. definitions can passed derive_param_tte() create new time--event parameter. Note practice efficacy parameters might use randomization date time event origin date.","code":"death <- event_source( dataset_name = \"adsl\", filter = DTHFL == \"Y\", date = DTHDT ) lstalv <- censor_source( dataset_name = \"adsl\", date = LSTALVDT ) adtte <- derive_param_tte( dataset_adsl = adsl, source_datasets = list(adsl = adsl), start_date = TRTSDT, event_conditions = list(death), censor_conditions = list(lstalv), set_values_to = exprs(PARAMCD = \"OS\", PARAM = \"Overall Survival\") )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"add-additional-information-for-events-and-censoring-evntdesc-srcvar","dir":"Articles","previous_headings":"Programming Workflow > Derive Parameters (CNSR, ADT, STARTDT)","what":"Add Additional Information for Events and Censoring (EVNTDESC, SRCVAR, …)","title":"Creating a BDS Time-to-Event ADaM","text":"add additional information like event censoring description (EVNTDESC) source variable (SRCVAR) set_values_to parameter can specified event/censoring definition.","code":"# define death event # death <- event_source( dataset_name = \"adsl\", filter = DTHFL == \"Y\", date = DTHDT, set_values_to = exprs( EVNTDESC = \"DEATH\", SRCDOM = \"ADSL\", SRCVAR = \"DTHDT\" ) ) # define censoring at last known alive date # lstalv <- censor_source( dataset_name = \"adsl\", date = LSTALVDT, set_values_to = exprs( EVNTDESC = \"LAST KNOWN ALIVE DATE\", SRCDOM = \"ADSL\", SRCVAR = \"LSTALVDT\" ) ) # derive time-to-event parameter # adtte <- derive_param_tte( dataset_adsl = adsl, source_datasets = list(adsl = adsl), event_conditions = list(death), censor_conditions = list(lstalv), set_values_to = exprs(PARAMCD = \"OS\", PARAM = \"Overall Survival\") )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"handling-subjects-without-assessment","dir":"Articles","previous_headings":"Programming Workflow > Derive Parameters (CNSR, ADT, STARTDT)","what":"Handling Subjects Without Assessment","title":"Creating a BDS Time-to-Event ADaM","text":"subject event record meeting censoring rule, included output dataset. order record subject output dataset, another censoring_source() object created specify patients censored. Therefore start censoring defined achieve subjects without data adrs censored start date. ADaM IG requires computed date must accompanied imputation flags. Thus, function detects --DTF /--TMF variable corresponding start_date STARTDTF STARTTMF set automatically values variables. date variable one event censoring source datasets imputed, imputation flag can specified set_values_to parameter event_source() censor_source() (see definition start censoring ). CDISC pilot contain RS dataset, following example progression free survival uses manually created datasets. event progression free survival occurs progression disease observed subject dies. Therefore two event_source() objects defined: pd progression disease death death. subjects may experience events. case first one selected derive_param_tte(). Subjects without event must censored last tumor assessment. censoring lastvisit object defined tumor assessments. Please note necessary select last one exclude assessments resulted progression disease. handled within derive_param_tte(). Patients without tumor assessment censored start date. Therefore start object defined treatment start date censoring date. necessary exclude patient tumor assessment definition start derive_param_tte() selects last date across censor_source() objects censoring date.","code":"View(adsl) View(adrs) # progressive disease event # pd <- event_source( dataset_name = \"adrs\", filter = AVALC == \"PD\", date = ADT, set_values_to = exprs( EVNTDESC = \"PD\", SRCDOM = \"ADRS\", SRCVAR = \"ADT\", SRCSEQ = ASEQ ) ) # death event # death <- event_source( dataset_name = \"adsl\", filter = DTHFL == \"Y\", date = DTHDT, set_values_to = exprs( EVNTDESC = \"DEATH\", SRCDOM = \"ADSL\", SRCVAR = \"DTHDT\" ) ) # last tumor assessment censoring (CNSR = 1 by default) # lastvisit <- censor_source( dataset_name = \"adrs\", date = ADT, set_values_to = exprs( EVNTDESC = \"LAST TUMOR ASSESSMENT\", SRCDOM = \"ADRS\", SRCVAR = \"ADT\" ) ) # start date censoring (for patients without tumor assessment) (CNSR = 2) # start <- censor_source( dataset_name = \"adsl\", date = TRTSDT, censor = 2, set_values_to = exprs( EVNTDESC = \"TREATMENT START\", SRCDOM = \"ADSL\", SRCVAR = \"TRTSDT\", ADTF = TRTSDTF ) ) # derive time-to-event parameter # adtte <- derive_param_tte( dataset_adsl = adsl, source_datasets = list(adsl = adsl, adrs = adrs), start_date = TRTSDT, event_conditions = list(pd, death), censor_conditions = list(lastvisit, start), set_values_to = exprs(PARAMCD = \"PFS\", PARAM = \"Progression Free Survival\") )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"deriving-a-series-of-time-to-event-parameters","dir":"Articles","previous_headings":"Programming Workflow > Derive Parameters (CNSR, ADT, STARTDT)","what":"Deriving a Series of Time-to-Event Parameters","title":"Creating a BDS Time-to-Event ADaM","text":"several similar time--event parameters need derived call_derivation() function useful. following example parameters time first AE, time first serious AE, time first related AE derived. censoring three. definition event differs.","code":"# define censoring # observation_end <- censor_source( dataset_name = \"adsl\", date = pmin(TRTEDT + days(30), EOSDT), censor = 1, set_values_to = exprs( EVNTDESC = \"END OF TREATMENT\", SRCDOM = \"ADSL\", SRCVAR = \"TRTEDT\" ) ) # define time to first AE # tt_ae <- event_source( dataset_name = \"ae\", date = ASTDT, set_values_to = exprs( EVNTDESC = \"ADVERSE EVENT\", SRCDOM = \"AE\", SRCVAR = \"AESTDTC\" ) ) # define time to first serious AE # tt_ser_ae <- event_source( dataset_name = \"ae\", filter = AESER == \"Y\", date = ASTDT, set_values_to = exprs( EVNTDESC = \"SERIOUS ADVERSE EVENT\", SRCDOM = \"AE\", SRCVAR = \"AESTDTC\" ) ) # define time to first related AE # tt_rel_ae <- event_source( dataset_name = \"ae\", filter = AEREL %in% c(\"PROBABLE\", \"POSSIBLE\", \"REMOTE\"), date = ASTDT, set_values_to = exprs( EVNTDESC = \"RELATED ADVERSE EVENT\", SRCDOM = \"AE\", SRCVAR = \"AESTDTC\" ) ) # derive all three time to event parameters # adaette <- call_derivation( derivation = derive_param_tte, variable_params = list( params( event_conditions = list(tt_ae), set_values_to = exprs(PARAMCD = \"TTAE\") ), params( event_conditions = list(tt_ser_ae), set_values_to = exprs(PARAMCD = \"TTSERAE\") ), params( event_conditions = list(tt_rel_ae), set_values_to = exprs(PARAMCD = \"TTRELAE\") ) ), dataset_adsl = adsl, source_datasets = list( adsl = adsl, ae = filter(adae, TRTEMFL == \"Y\") ), censor_conditions = list(observation_end) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"deriving-time-to-event-parameters-using-by-groups","dir":"Articles","previous_headings":"Programming Workflow > Derive Parameters (CNSR, ADT, STARTDT)","what":"Deriving Time-to-Event Parameters Using By Groups","title":"Creating a BDS Time-to-Event ADaM","text":"time--event parameters need derived group source dataset, by_vars parameter can specified. time--event parameter derived group. Please note CDISC requires separate parameters (PARAMCD, PARAM) groups. Therefore variables specified by_vars parameter included output dataset. PARAMCD variable specified set_value_to parameter using expression right hand side results unique value group. values variables included output dataset, can stored PARCATn variables. following example time--event parameter preferred term AE dataset derived.","code":"View(adsl) View(ae) # define time to first adverse event event # ttae <- event_source( dataset_name = \"ae\", date = AESTDT, set_values_to = exprs( EVNTDESC = \"AE\", SRCDOM = \"AE\", SRCVAR = \"AESTDTC\", SRCSEQ = AESEQ ) ) # define censoring at end of study # eos <- censor_source( dataset_name = \"adsl\", date = EOSDT, set_values_to = exprs( EVNTDESC = \"END OF STUDY\", SRCDOM = \"ADSL\", SRCVAR = \"EOSDT\" ) ) # derive time-to-event parameter # adtte <- derive_param_tte( dataset_adsl = adsl, by_vars = exprs(AEDECOD), start_date = TRTSDT, event_conditions = list(ttae), censor_conditions = list(eos), source_datasets = list(adsl = adsl, ae = ae), set_values_to = exprs( PARAMCD = paste0(\"TTAE\", as.numeric(as.factor(AEDECOD))), PARAM = paste(\"Time to First\", AEDECOD, \"Adverse Event\"), PARCAT1 = \"TTAE\", PARCAT2 = AEDECOD ) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"aval","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Analysis Value (AVAL)","title":"Creating a BDS Time-to-Event ADaM","text":"analysis value (AVAL) can derived calling derive_vars_duration(). example derives time event days. units can requested specifying out_unit parameter.","code":"adtte <- derive_vars_duration( adtte, new_var = AVAL, start_date = STARTDT, end_date = ADT )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"aseq","dir":"Articles","previous_headings":"Programming Workflow","what":"Derive Analysis Sequence Number (ASEQ)","title":"Creating a BDS Time-to-Event ADaM","text":"admiral function derive_var_obs_number() can used derive ASEQ:","code":"adtte <- derive_var_obs_number( adtte, by_vars = exprs(STUDYID, USUBJID), order = exprs(PARAMCD), check_type = \"error\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"adslvars","dir":"Articles","previous_headings":"Programming Workflow","what":"Add ADSL Variables","title":"Creating a BDS Time-to-Event ADaM","text":"Variables ADSL required time--event analyses, e.g., treatment variables covariates can added using derive_vars_merged().","code":"adtte <- derive_vars_merged( adtte, dataset_add = adsl, new_vars = exprs(ARMCD, ARM, ACTARMCD, ACTARM, AGE, SEX), by_vars = exprs(STUDYID, USUBJID) )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/bds_tte.html","id":"attributes","dir":"Articles","previous_headings":"Programming Workflow","what":"Add Labels and Attributes","title":"Creating a BDS Time-to-Event ADaM","text":"Adding labels attributes SAS transport files supported following packages: metacore: establish common foundation use metadata within R session. metatools: enable use metacore objects. Metatools can used build datasets enhance columns existing datasets well checking datasets metadata. xportr: functionality associate metadata information local R data frame, perform data set level validation checks convert transport v5 file(xpt). NOTE: packages experimental phase, vision associated End End pipeline umbrella pharmaverse. example applying metadata perform associated checks can found pharmaverse E2E example.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Programming Concepts and Conventions","text":"vignette aims discuss common programming concepts conventions adopted within admiral family packages. intended user-facing version Programming Strategy vignette, users can also read latter becoming familiar package expand topics interest. common admiral FAQ, visit corresponding FAQ page provided drop menu vignette.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"input-and-output","dir":"Articles","previous_headings":"","what":"Input and Output","title":"Programming Concepts and Conventions","text":"expected input dataset grouped. Otherwise error issued. output dataset ungrouped. observations ordered dedicated way. particular, order observations input dataset may preserved.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"admiral-functions-and-options","dir":"Articles","previous_headings":"","what":"{admiral} Functions and Options","title":"Programming Concepts and Conventions","text":"general principle, behavior admiral functions determined input, global object, .e. inputs like datasets, variable names, options, etc. must provided function arguments. Correspondingly, general functions side-effects like creating modifying global objects, printing, writing files, etc. exception principle found approach package options (see get_admiral_option() set_admiral_options()), allow user-defined defaults commonly used function arguments. instance, option subject_keys currently pre-defined exprs(STUDYID, USUBJID), can modified using set_admiral_options(subject_keys = exprs(...)) top script. full discussion admiral Inputs, Outputs Options, see section developer-facing Programming Strategy.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"missing","dir":"Articles","previous_headings":"","what":"Handling of Missing Values","title":"Programming Concepts and Conventions","text":"using haven package read SAS datasets R, SAS-style character missing values, .e. \"\", converted proper R NA values. Rather kept . problematic downstream data processing R handles \"\" just string. Thus, data manipulation performed SAS blanks converted R NAs using admiral’s convert_blanks_to_na() function, e.g. Note logical operator applied NA value always returns NA rather TRUE FALSE. exception .na() returns TRUE input NA. Thus, filter visits \"Baseline\" following condition need used. Also note aggregation functions, like mean() max(), also return NA element input vector missing. avoid behavior one explicitly set na.rm = TRUE. important keep mind using admiral’s aggregation functions derive_summary_records(). handling NAs sorting variables see Sort Order.","code":"dm <- haven::read_sas(\"dm.sas7bdat\") %>% convert_blanks_to_na() visits <- c(\"Baseline\", NA, \"Screening\", \"Week 1 Day 7\") visits != \"Baseline\" #> [1] FALSE NA TRUE TRUE is.na(visits) #> [1] FALSE TRUE FALSE FALSE visits != \"Baseline\" | is.na(visits) #> [1] FALSE TRUE TRUE TRUE mean(c(1, NA, 2)) #> [1] NA mean(c(1, NA, 2), na.rm = TRUE) #> [1] 1.5"},{"path":[]},{"path":[]},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"expr-and-exprs","dir":"Articles","previous_headings":"Expressions in Scripts > Quoting and Unquoting: Introducing expr(), exprs(), !! and !!!","what":"expr() and exprs()","title":"Programming Concepts and Conventions","text":"expr() function rlang package, used create expression. expression evaluated - rather, passed derivation function evaluates environment. exprs() plural version expr(), accepts multiple comma-separated items returns list expressions. used within contest admiral derivation function, expr() exprs() allow function evaluate expressions context input dataset. example, expr() exprs() allow users pass variable names datasets function without wrapping quotation marks. expressions framework powerful users able intuitively “inject code” admiral functions (function parameters) using similar syntax writing open code, exception possibly outer exprs() wrapper. instance, derive_vars_merged() call , user merging adsl ex able filter ex prior merge using expression passed filter_add parameter. filter_add accepts expressions, user full power filter dataset please. vein, user able create new variables wish merge using new_vars argument, pass list expressions containing “standard” R code.","code":"library(rlang) adae <- data.frame(USUBJID = \"XXX-1\", AEDECOD = \"HEADACHE\") # Return the adae object adae #> USUBJID AEDECOD #> 1 XXX-1 HEADACHE # Return an expression expr(adae) #> adae derive_vars_merged( adsl, dataset_add = ex, filter_add = !is.na(EXENDTM), by_vars = exprs(STUDYID, USUBJID), new_vars = exprs( TRTEDTM = EXENDTM, TRTETMF = EXENTMF, COMPTRT = if_else(!is.na(EXENDTM), \"Y\", \"N\") ), order = exprs(EXENDTM), mode = \"last\" )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"unquoting","dir":"Articles","previous_headings":"Expressions in Scripts > Quoting and Unquoting: Introducing expr(), exprs(), !! and !!!","what":"Bang-Bang (!!) and Bang-Bang-Bang (!!!)","title":"Programming Concepts and Conventions","text":"Sometimes may want construct expression using , pre-existing expressions. However, ’s immediately clear achieve expressions inherently pause evaluation code ’s executed: !! (bang-bang) comes : provided rlang package, allows inject contents expression another expression, meaning using !! can modify code inside expression R evaluates . using !! unquoting expression, .e. evaluating pass onwards. can see example !! comes handy within admiral code Common Pitfall 1, contents expression unquoted can passed derive_vars_merged(). !!! (bang-bang-bang) plural version !! can used unquote list expressions: Within admiral, operator can useful need unquote list variables (stored expressions) use inside admiral even dplyr call. One example admiral subject keys: want use subject keys stored within admiral option subset dataset, need use !!! unquote list. Let’s construct dummy example illustrate point: can see another example !!! action line admiral ADEX template script, used dynamically control variables passed admiral function.","code":"a <- expr(2) b <- expr(3) expr(a + b) #> a + b # NOT 2 + 3 expr(!!a + !!b) #> 2 + 3 exprs(!!!list(a, b)) #> [[1]] #> [1] 2 #> #> [[2]] #> [1] 3 get_admiral_option(\"subject_keys\") #> [[1]] #> STUDYID #> #> [[2]] #> USUBJID adcm <- data.frame(STUDYID = \"XXX\", USUBJID = \"XXX-1\", CMTRT = \"ASPIRIN\") adcm #> STUDYID USUBJID CMTRT #> 1 XXX XXX-1 ASPIRIN # This doesn't work as we are not unquoting the subject keys adcm %>% select(get_admiral_option(\"subject_keys\")) #> Error in `select()`: #> ! Can't select columns with `get_admiral_option(\"subject_keys\")`. #> ✖ `get_admiral_option(\"subject_keys\")` must be numeric or character, not a list. # This works because we are unquoting the subject keys adcm %>% select(!!!get_admiral_option(\"subject_keys\")) #> STUDYID USUBJID #> 1 XXX XXX-1"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"summary","dir":"Articles","previous_headings":"Expressions in Scripts > Quoting and Unquoting: Introducing expr(), exprs(), !! and !!!","what":"Summary","title":"Programming Concepts and Conventions","text":"summary, although expressions framework may seem slightly clunky mysterious begin , allows power flexibility forms key part admiral package. comprehensive treatment expressions, see Chapter 18 Chapter 19 Advanced R textbook. Chapter 19 specifically covers much detail concept unquoting.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"common-pitfalls","dir":"Articles","previous_headings":"Expressions in Scripts","what":"Common pitfalls","title":"Programming Concepts and Conventions","text":"Expressions powerful, can also lead misunderstandings functionality. Let’s set dummy data explore common issues new (experienced!) programmers may encounter dealing expressions.","code":"library(dplyr, warn.conflicts = FALSE) library(admiral) vs <- tribble( ~USUBJID, ~VSTESTCD, ~VISIT, ~VSSTRESN, ~VSSTRESU, ~VSDTC, \"01-1301\", \"WEIGHT\", \"SCREENING\", 82.1, \"kg\", \"2013-08-29\", \"01-1301\", \"WEIGHT\", \"WEEK 2\", 81.19, \"kg\", \"2013-09-15\", \"01-1301\", \"WEIGHT\", \"WEEK 4\", 82.56, \"kg\", \"2013-09-24\", \"01-1302\", \"BMI\", \"SCREENING\", 20.1, \"kg/m2\", \"2013-08-29\", \"01-1302\", \"BMI\", \"WEEK 2\", 20.2, \"kg/m2\", \"2013-09-15\", \"01-1302\", \"BMI\", \"WEEK 4\", 19.9, \"kg/m2\", \"2013-09-24\" ) dm <- tribble( ~USUBJID, ~AGE, \"01-1301\", 18 )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"pitfall1","dir":"Articles","previous_headings":"Expressions in Scripts > Common pitfalls","what":"1. Mistakenly passing something that isn’t an expression to an argument","title":"Programming Concepts and Conventions","text":"writing complex admiral code can easy mistakenly pass wrong input argument expects expression. example, code fails my_expression expression - name object global environment containing expression. fix code, need unquote my_expression expression holding passed correctly derive_vars_merged():","code":"my_expression <- expr(VSTESTCD == \"WEIGHT\" & VISIT == \"SCREENING\") derive_vars_merged( dm, dataset_add = select(vs, USUBJID, VSTESTCD, VISIT), by_vars = exprs(USUBJID), filter_add = my_expression ) #> Error in `derive_vars_merged()`: #> ! Argument `filter_add` must be a filter condition, but is a symbol derive_vars_merged( dm, dataset_add = select(vs, USUBJID, VSTESTCD, VISIT), by_vars = exprs(USUBJID), filter_add = !!my_expression ) #> # A tibble: 1 × 4 #> USUBJID AGE VSTESTCD VISIT #> #> 1 01-1301 18 WEIGHT SCREENING"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"forgetting-that-expressions-must-be-evaluable-in-the-dataset","dir":"Articles","previous_headings":"Expressions in Scripts > Common pitfalls","what":"2. Forgetting that expressions must be evaluable in the dataset","title":"Programming Concepts and Conventions","text":"similar vein , even actual expression passed argument, must make sure can evaluated within dataset interest. may seem trivial, common pitfall expressions delay evaluation code can delay identification issues. instance, consider example: second call fails hidden within expression mention VSTPT, dropped vs filter_vs_and_merge().","code":"filter_vs_and_merge <- function(my_expression) { derive_vars_merged( dm, dataset_add = select(vs, USUBJID, VSTESTCD, VISIT), by_vars = exprs(USUBJID), filter_add = !!my_expression ) } # This works filter_vs_and_merge(expr(VSTESTCD == \"WEIGHT\" & VISIT == \"SCREENING\")) #> # A tibble: 1 × 4 #> USUBJID AGE VSTESTCD VISIT #> #> 1 01-1301 18 WEIGHT SCREENING # This fails filter_vs_and_merge(expr(VSTESTCD == \"WEIGHT\" & VISIT == \"SCREENING\" & VSTPT == \"PREDOSE\")) #> Error in `filter()`: #> ℹ In argument: `VSTESTCD == \"WEIGHT\" & VISIT == \"SCREENING\" & VSTPT == #> \"PREDOSE\"`. #> Caused by error: #> ! object 'VSTPT' not found"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/concepts_conventions.html","id":"see-also","dir":"Articles","previous_headings":"","what":"See also","title":"Programming Concepts and Conventions","text":"Programming Strategy","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"what-is-admiral","dir":"Articles","previous_headings":"","what":"What is admiral?","title":"FAQ","text":"block stand alone purpose (function provides specific functionality) Data Scientists can create blocks (create R functions) Constructing ADaM dataset become like building blocks based admiral modular functions user created modular functions.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"why-did-we-decide-to-start-admiral","dir":"Articles","previous_headings":"","what":"Why did we decide to start admiral?","title":"FAQ","text":"Data analysis challenges clinical trials vary depending scientific goals, therapeutic areas, indications, data sources data quality. face challenge limit company-level adoption crowd-sourcing create ADaM datasets? Build ADaMs via collaboration co-creation Early engagement like-minded companies moving towards R lead solution shared open source framework contribution across-industry Building ADaMs like modular building blocks, everyone can contribute module clear input output enable re-usable solutions Users can “slot ” modules address specific company/TA/Molecule/Study requirements TA specific requirements can open sourced transformed common ADaM approach analysis long-term gain consistent way producing ADaM wider community across-industry developers contributing grow codebase cover infinite array possibilities Contributors: option make name Pharma open-source community & avenue collaborate like-minded people across industry Imagine ADaMs built consistent manner code openly maintained functions impact Health Authorities, readable code, QC, talent flow","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"why-did-we-use-r-as-a-programming-language","dir":"Articles","previous_headings":"","what":"Why did we use R as a programming language?","title":"FAQ","text":"R isolated software product, everyone can contribute (open source principal) People University/Statistical talent pipeline likely come R skills rather proprietary language seems strong data science/analytics R community FDA open accepting R submissions heavy users Top line visualization/graphics - R-Shiny interactive data displays also R Markdown offers great report writing functionality R popular among statisticians new statistical methods likely implemented R language might equally suited programming languages - however stage make decision :)","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"admiral-offers-a-toolbox-of-functions-to-facilitate-adam--what-does-that-mean","dir":"Articles","previous_headings":"","what":"Admiral offers a toolbox of functions to facilitate ADaM. What does that mean?","title":"FAQ","text":"e.g. derive_vars_aage parameterized start end-date unit. Depending parameters results may vary specification. Functions serve toolbox user can create ADaM according requirements. principles, programming strategy documentation admiral considered framework users contribute.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"how-does-a-user-know-what-a-function-does-exactly","dir":"Articles","previous_headings":"","what":"How does a user know what a function does exactly?","title":"FAQ","text":"Function details purpose, requirements, parameters, dependencies examples documented header function. Complex functions potentially vignette admiral homepage provide details. admiral provide link explicit specification define.xml.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"where-a-user-can-quickly-find-some-references-or-advice-to-use-a-function","dir":"Articles","previous_headings":"","what":"Where a user can quickly find some references or advice to use a function?","title":"FAQ","text":"Cheat Sheet available, providing examples many admiral functions. detailed description, please refer Reference section.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"would-admiral-create-a-whole-adam-dataset","dir":"Articles","previous_headings":"","what":"Would {admiral} create a whole ADaM dataset?","title":"FAQ","text":"admiral meant toolbox enable Data Scientists build ADaMs according varying analysis needs admiral meant “click button, comes ADaM” tool admiral webpage, example scripts provided can used starting point create ADaM (see end vignette)","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"in-which-order-does-a-user-need-to-execute-the-functions","dir":"Articles","previous_headings":"","what":"In which order does a user need to execute the functions?","title":"FAQ","text":"Guidance provided ADSL, BDS OCCDS ADaM structure including template scripts.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"is-the-admiral-package-validated","dir":"Articles","previous_headings":"","what":"Is the {admiral} package validated?","title":"FAQ","text":"functions reviewed tested (see provided around function testing?) ensure work described documentation. Test cases function part R package. Users can add tests provide additional feedback. testing admiral team function replace QC validation process company. GitHub action (using open source packages) exists generate validation report R package, option company use. example report using earlier version admiral exists illustration.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"what-will-be-provided-around-function-testing","dir":"Articles","previous_headings":"","what":"What will be provided around function testing?","title":"FAQ","text":"Unit tests reliability function - available part open source release integration testing done ensure functions can called together create ADaM (e.g. even via internal testing teams) validation able use package company-specific SCE GxP purposes associated audit evidence strategy use admiral fits company-specific quality assurance process (double programming comparison versus company-specific legacy ADaM solution appropriate confidence builds) see guidance unit testing","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"will-admiral-provide-harmonized-define-xml-or-submittable-specifications-for-functions","dir":"Articles","previous_headings":"","what":"Will admiral provide harmonized define.xml or submittable specifications for functions?","title":"FAQ","text":". functions documented via programming headers, define.xml responsibility end user. Functions usually generalized specific. (see Admiral offers toolbox functions facilitate ADaM. mean?) users responsible make sure use functions parameters right way ensure alignment define.xml","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"will-admiral-provide-adam-ig-cdisc-compliant-datasets","dir":"Articles","previous_headings":"","what":"Will {admiral} provide ADaM IG CDISC compliant datasets?","title":"FAQ","text":"Although admiral follows CDISC standards claim dataset resulting calling admiral functions ADaM compliant. ensured user.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"how-much-of-the-adam-ig-is-covered-by-admiral","dir":"Articles","previous_headings":"","what":"How much of the ADaM IG is covered by admiral?","title":"FAQ","text":"ADaM IG standard framework without specific number datasets variables, used specific baseline answer question. provide guidance ADaM dataset structure (ADSL, OCCDS BDS) highlight functionality admiral covers. (see order user need execute functions?) guidance also highlight gaps filled user (e.g. timing, ranges). standard ADaM datasets (ADAE, ADCM, …) can provide estimated coverage based early adopters Roche/GSK ADaM implementation","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"will-there-be-a-usercontribution-guide","dir":"Articles","previous_headings":"","what":"Will there be a user/contribution guide?","title":"FAQ","text":"programming strategy serves framework users create functions. Please see contribution model website detailed description contribute","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"how-has-admiral-been-tested-externally-to-rochegsk","dir":"Articles","previous_headings":"","what":"How has {admiral} been tested externally to Roche/GSK?","title":"FAQ","text":"Sept/Oct 2021, limited release testing conducted 18 companies (>50 individuals) order assess compatibility admiral toolkit different company standards implementations test usability functions, e.g. clarity, reliability, robustness, flexibility. foundational version admiral achieved 7.9 / 10 average score survey respondents >75% said ’d advocate using admiral ADaM transformations R. “Extremely easy learn get , well thought planned. Plenty minor functions instead aiming create large”jack trades” framework. toolkit attempt become large one-button ADaM generator (fantastic).” “huge advantage Pharma companies common functions common stuff develop. easier authorities foundation ADaM programs. development goes faster every one develop across companies, bug-fixing faster many using package likely find potential bugs.” “huge proponent shared solutions within Pharma. Overall impressed admiral project – design, development, documentation, validation details available teams readily adopt.”","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/faq.html","id":"are-there-any-presentations-available-about-admiral","dir":"Articles","previous_headings":"","what":"Are there any presentations available about {admiral}?","title":"FAQ","text":"full collection admiral conference presentations years, please travel Presentation Archive.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Generic Derivations","text":"vignette provides overview important admiral functions, generic derivations. derive specific variable parameter specific dataset can used many different derivations many different datasets. important concepts examples presented . full details examples see documentation functions.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"required-packages","dir":"Articles","previous_headings":"Introduction","what":"Required Packages","title":"Generic Derivations","text":"examples vignette require following packages.","code":"library(admiral) library(tibble)"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"characterization-of-derivations","dir":"Articles","previous_headings":"","what":"Characterization of Derivations","title":"Generic Derivations","text":"generic functions can characterized following three properties: Variables Records/Parameters single source dataset Multiple source datasets Selection: new values derived selecting records, e.g., baseline records, last exposure record, … Summary: new values derived summarizing values, e.g., sum, average, concatenation, … Computation: new values derived computation one value input, e.g., deriving BMI BSA height weight","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"overview-of-derivations","dir":"Articles","previous_headings":"Characterization of Derivations","what":"Overview of Derivations","title":"Generic Derivations","text":"Using three properties makes easy find appropriate function particular derivation. following interactive table lists generic functions properties.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"source-data","dir":"Articles","previous_headings":"","what":"Source Data","title":"Generic Derivations","text":"derivation functions expect single source dataset. multiple source datasets can specified. cases way specify source datasets across generic functions.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"single-source-dataset","dir":"Articles","previous_headings":"Source Data","what":"Single Source Dataset","title":"Generic Derivations","text":"functions expecting single source dataset data provided dataset_add argument. mandatory argument. data provided dataset argument used1. dataset_add argument provided, data dataset used (derive_var_extreme_flag()).","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"multiple-source-datasets","dir":"Articles","previous_headings":"Source Data","what":"Multiple Source Datasets","title":"Generic Derivations","text":"functions expecting multiple source datasets data provided source_datasets argument. datasets referred dataset_name element source objects. example, consider derivation response parameter. three possible responses defined event() objects. objects define events include data. Instead dataset_name field set (character) id. id used source_datasets argument derivation function link data events. .e., first two events (complete_response partial_response) dataset adrs_ovr used last event dataset myadsl used. allows define source objects independent data. .e., source object can used different source datasets. example, parameter derived data second reporter just changing source_dataset: source objects dataset_name element optional, e.g., event(). specified, input dataset (dataset) used.","code":"complete_response <- event( description = \"Define complete response\", dataset_name = \"ovr\", condition = AVALC == \"CR\", set_values_to = exprs(AVALC = \"COMPLETE RESPONSE\") ) partial_response <- event( description = \"Define partial response\", dataset_name = \"ovr\", condition = AVALC == \"PR\", set_values_to = exprs(AVALC = \"PARTIAL RESPONSE\") ) no_response <- event( description = \"Define no response for all patients in adsl\", dataset_name = \"adsl\", condition = TRUE, set_values_to = exprs(AVALC = \"NO RESPONSE\") ) derive_extreme_event( ... events = list(complete_response, partial_response, no_response), source_datasets = list(ovr = adrs_ovr, adsl = myadsl), ... ) derive_extreme_event( ... events = list(complete_response, partial_response, no_response), source_datasets = list(ovr = adrs_ovr_reporter2, adsl = myadsl), ... )"},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"methods","dir":"Articles","previous_headings":"","what":"Methods","title":"Generic Derivations","text":"generic derivations use three different methods deriving values new variables records. Usually derivation applies method several times, group input source data. groups defined by_vars argument, e.g., by_vars = exprs(USUBJID) “subject” by_vars = exprs(USUBJID, PARAMCD) “subject parameter”.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"selection","dir":"Articles","previous_headings":"Methods","what":"Selection","title":"Generic Derivations","text":"common method selection method. selects record source dataset(s) adds information selected record input dataset. information just flag indicating record exists, one variables selected records, new variables created selected record.","code":""},{"path":"https://pharmaverse.github.io/admiral/dev/articles/generic.html","id":"options-for-selection","dir":"Articles","previous_headings":"Methods > Selection","what":"Options for Selection","title":"Generic Derivations","text":"simplest case record selected condition. condition specified filter_add filter argument. following example baseline weight added ADSL. Sometimes possible select record interest condition, e.g., first, last, best, worst, lowest, highest, … value derived. case mode order argument can specified select first last record respect variables specified order. day last valid dose added ADSL. also possible select record based records input source dataset. type selection admiral provides functions derive_vars_joined(), derive_var_joined_exist_flag(), derive_extreme_event(). provide filter_join argument accepts conditions variables input dataset (dataset) additional dataset (dataset_add). example consider deriving day dose last study treatment adverse event: filter_join condition applied temporary dataset created left joining input dataset additional dataset (restricted filter_add): “joined” function can also used condition selecting depends previous subsequent records dataset. case dataset specified dataset dataest_add. Consider following example \"HIGH\" results flagged confirmed second \"HIGH\" result least ten days later. join_type argument set \"\" restrict joined records subsequent results. variables included dataset dataset_add, dataset_add renamed adding suffix “.join”. variables dataset_add used filter_join must specified join_vars. temporary dataset applying filter_join : possible use summary functions like () () filter_join. Assume previous example records flagged results flagged record confirmation record \"HIGH\". can achieved specifying first_cond_upper argument set condition confirmation. first_cond_upper argument specified records joined dataset restricted first records condition fulfilled: Thereafter filter_join applied restricted joined dataset. .e., () function considers results confirmation records ignores subsequent results. Note: principle, actually achieve every result derive_vars_merged() derive_var_merged_exist_flag() using derive_vars_joined() derive_var_joined_exist_flag() respectively. However, “joined” functions require much resources (time memory), hence recommended use really required, .e., condition selecting records depends variables datasets.","code":"adsl <- tribble( ~USUBJID, \"1\", \"2\", \"3\" ) advs <- tribble( ~USUBJID, ~PARAMCD, ~AVISIT, ~ABLFL, ~AVAL, ~AVALU, \"1\", \"WEIGHT\", \"BASELINE\", \"Y\", 58.7, \"kg\", \"1\", \"HEIGHT\", \"BASELINE\", \"Y\", 169.2, \"cm\", \"1\", \"WEIGHT\", \"WEEK 3\", NA, 59.3, \"kg\", \"2\", \"WEIGHT\", \"BASELINE\", \"Y\", 72.5, \"kg\", \"2\", \"WEIGHT\", \"WEKK 3\", NA, 71.9, \"kg\", ) derive_vars_merged( adsl, dataset_add = advs, by_vars = exprs(USUBJID), filter_add = PARAMCD == \"WEIGHT\" & ABLFL == \"Y\", new_vars = exprs(WGTBL = AVAL) ) #> # A tibble: 3 × 2 #> USUBJID WGTBL #> #> 1 1 58.7 #> 2 2 72.5 #> 3 3 NA adsl <- tribble( ~USUBJID, \"1\", \"2\", \"3\" ) ex <- tribble( ~USUBJID, ~EXSTDY, ~EXDOSE, \"1\", 1, 50, \"1\", 7, 70, \"1\", 14, 0, \"2\", 1, 75, \"2\", 9, 70 ) derive_vars_merged( adsl, dataset_add = ex, by_vars = exprs(USUBJID), filter_add = EXDOSE > 0, order = exprs(EXSTDY), mode = \"last\", new_vars = exprs(TRTEDY = EXSTDY) ) #> # A tibble: 3 × 2 #> USUBJID TRTEDY #> #> 1 1 7 #> 2 2 9 #> 3 3 NA adae <- tribble( ~USUBJID, ~ASTDY, ~AESEQ, \"1\", 3, 1, \"1\", 3, 2, \"1\", 15, 3 ) ex <- tribble( ~USUBJID, ~EXSTDY, ~EXDOSE, \"1\", 1, 50, \"1\", 7, 70, \"1\", 14, 0, \"2\", 1, 75, \"2\", 9, 70 ) derive_vars_joined( adae, dataset_add = ex, by_vars = exprs(USUBJID), filter_add = EXDOSE > 0, filter_join = EXSTDY <= ASTDY, join_type = \"all\", order = exprs(EXSTDY), mode = \"last\", new_vars = exprs(LSTDOSDY = EXSTDY, LASTDOS = EXDOSE) ) #> # A tibble: 3 × 5 #> USUBJID ASTDY AESEQ LSTDOSDY LASTDOS #> #> 1 1 3 1 1 50 #> 2 1 3 2 1 50 #> 3 1 15 3 7 70 #> # A tibble: 6 × 5 #> USUBJID ASTDY AESEQ EXSTDY EXDOSE #> #> 1 1 3 1 1 50 #> 2 1 3 1 7 70 #> 3 1 3 2 1 50 #> 4 1 3 2 7 70 #> 5 1 15 3 1 50 #> 6 1 15 3 7 70 adlb <- tribble( ~USUBJID, ~PARAMCD, ~ADY, ~ANRIND, \"1\", \"AST\", 1, \"HIGH\", \"1\", \"AST\", 7, \"HIGH\", \"1\", \"AST\", 14, \"NORMAL\", \"1\", \"ALT\", 1, \"HIGH\", \"1\", \"ALT\", 7, \"NORMAL\", \"1\", \"ALT\", 14, \"HIGH\", \"2\", \"AST\", 1, \"HIGH\", \"2\", \"AST\", 15, \"HIGH\", \"2\", \"AST\", 22, \"NORMAL\", \"2\", \"ALT\", 1, \"HIGH\" ) derive_var_joined_exist_flag( adlb, dataset_add = adlb, by_vars = exprs(USUBJID, PARAMCD), order = exprs(ADY), join_vars = exprs(ADY, ANRIND), join_type = \"after\", filter_join = ANRIND == \"HIGH\" & ANRIND.join == \"HIGH\" & ADY.join > ADY + 10, new_var = HICONFFL ) #> # A tibble: 10 × 5 #> USUBJID PARAMCD ADY ANRIND HICONFFL #> #> 1 1 AST 1 HIGH NA #> 2 1 AST 7 HIGH NA #> 3 1 AST 14 NORMAL NA #> 4 1 ALT 1 HIGH Y #> 5 1 ALT 7 NORMAL NA #> 6 1 ALT 14 HIGH NA #> 7 2 AST 1 HIGH Y #> 8 2 AST 15 HIGH NA #> 9 2 AST 22 NORMAL NA #> 10 2 ALT 1 HIGH NA #> # A tibble: 9 × 6 #> USUBJID PARAMCD ADY ANRIND ADY.join ANRIND.join #> #> 1 1 ALT 1 HIGH 7 NORMAL #> 2 1 ALT 1 HIGH 14 HIGH #> 3 1 ALT 7 NORMAL 14 HIGH #> 4 1 AST 1 HIGH 7 HIGH #> 5 1 AST 1 HIGH 14 NORMAL #> 6 1 AST 7 HIGH 14 NORMAL #> 7 2 AST 1 HIGH 15 HIGH #> 8 2 AST 1 HIGH 22 NORMAL #> 9 2 AST 15 HIGH 22 NORMAL derive_var_joined_exist_flag( adlb, dataset_add = adlb, by_vars = exprs(USUBJID, PARAMCD), order = exprs(ADY), join_vars = exprs(ADY, ANRIND), join_type = \"after\", first_cond_upper = ANRIND.join == \"HIGH\" & ADY.join > ADY + 10, filter_join = ANRIND == \"HIGH\" & all(ANRIND.join == \"HIGH\"), new_var = HICONFFL ) #> # A tibble: 10 × 5 #> USUBJID PARAMCD ADY ANRIND HICONFFL #>