Addins and utility functions that help with documentation,
-testing and checking on health of the code base in all admiral
-packages.
+
Utility functions that help with documentation, testing and
+checking on health of the code base in all admiral packages.
Vignettes on working on admiral functions,
developing unit testing, releases process, vignette writing and other
documentation needs. These vignettes are intended for use across all
diff --git a/dev/articles/git_usage.html b/dev/articles/git_usage.html
index 4b6919a1..83ee21d2 100644
--- a/dev/articles/git_usage.html
+++ b/dev/articles/git_usage.html
@@ -34,7 +34,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/articles/index.html b/dev/articles/index.html
index 350eb00d..8ccdc3e9 100644
--- a/dev/articles/index.html
+++ b/dev/articles/index.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/articles/package_extensions.html b/dev/articles/package_extensions.html
index 00da1306..e09d70de 100644
--- a/dev/articles/package_extensions.html
+++ b/dev/articles/package_extensions.html
@@ -34,7 +34,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/articles/pr_review_guidance.html b/dev/articles/pr_review_guidance.html
index 3b9ad356..ab80d298 100644
--- a/dev/articles/pr_review_guidance.html
+++ b/dev/articles/pr_review_guidance.html
@@ -34,7 +34,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/articles/programming_strategy.html b/dev/articles/programming_strategy.html
index 72964222..1d9b87d6 100644
--- a/dev/articles/programming_strategy.html
+++ b/dev/articles/programming_strategy.html
@@ -34,7 +34,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/articles/rcmd_issues.html b/dev/articles/rcmd_issues.html
index 36f19aa0..885cb7d4 100644
--- a/dev/articles/rcmd_issues.html
+++ b/dev/articles/rcmd_issues.html
@@ -34,7 +34,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/articles/release_strategy.html b/dev/articles/release_strategy.html
index 098bd08c..8328af48 100644
--- a/dev/articles/release_strategy.html
+++ b/dev/articles/release_strategy.html
@@ -34,7 +34,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/articles/test_data_guidance.html b/dev/articles/test_data_guidance.html
index fc2f06f0..f61a9490 100644
--- a/dev/articles/test_data_guidance.html
+++ b/dev/articles/test_data_guidance.html
@@ -34,7 +34,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/articles/unit_test_format_tests.png b/dev/articles/unit_test_format_tests.png
old mode 100755
new mode 100644
index 8d2c4336..e1b4f179
Binary files a/dev/articles/unit_test_format_tests.png and b/dev/articles/unit_test_format_tests.png differ
diff --git a/dev/articles/unit_test_guidance.html b/dev/articles/unit_test_guidance.html
index 5f240f7d..515deedc 100644
--- a/dev/articles/unit_test_guidance.html
+++ b/dev/articles/unit_test_guidance.html
@@ -34,7 +34,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
@@ -328,14 +328,24 @@
Set up the Test Script
-
Addin admiraldev::format_test_that_file()
+
Addin pharmaverse4devs::format_test_that_file()
To ease the burden on developers for writing and adding tests we have
developed an Addin for formatting test_that test files according to
admiral programming standards. The Addin will add and update comments as
-well as number or re-numbers the tests. Just use the Addin button and
-select the “Format test_that test file” as seen in the image. Be sure to
-have the test-file open and selected when calling the Addin.
+well as number or re-numbers the tests. To access the Addin, be sure to
+install the {pharmaverse4devs} from Github.
+
To install the latest development version of the package directly
+from GitHub use the following code:
Then use the Addin button and select the “Format test_that test file”
+as seen in the image. Be sure to have the test-file open and selected
+when calling the Addin.
The Addin will perform the following:
@@ -355,54 +365,54 @@
Addin admiraldev::format_te
When writing new unit tests, just provide a description in the
test_that() call and if necessary the function name in a
# <function name> ---- comment:
-
# arg_name ----
-test_that("arg_name works", {
-expect_equal(arg_name(sym("a")), "a")
-expect_equal(arg_name(call("enquo", sym("a"))), "a")
-expect_error(arg_name("a"), "Could not extract argument name from")
-})
-
-# convert_dtm_to_dtc ----
-test_that("works if dtm is in correct format", {
-expect_equal(
-convert_dtm_to_dtc(as.POSIXct("2022-04-05 15:34:07 UTC")),
-"2022-04-05T15:34:07"
-)
-})
-
-test_that("Error is thrown if dtm is not in correct format", {
-expect_error(
-convert_dtm_to_dtc("2022-04-05T15:26:14"),
-"lubridate::is.instant(dtm) is not TRUE",
- fixed =TRUE
-)
-})
+
# derive_vars_merged ----
+test_that( "works if it merges all variables", {
+ actual <- derive_vars_merged(advs,
+ dataset_add = adsl,
+ by_vars = exprs(STUDYID, USUBJID)
+ )
+
+# convert_dtm_to_dtc ----
+test_that("works if dtm is in correct format", {
+ expect_equal(
+ convert_dtm_to_dtc(as.POSIXct("2022-04-05 15:34:07 UTC")),
+ "2022-04-05T15:34:07"
+ )
+})
+
+test_that("Error is thrown if dtm is not in correct format", {
+ expect_error(
+ convert_dtm_to_dtc("2022-04-05T15:26:14"),
+ "lubridate::is.instant(dtm) is not TRUE",
+ fixed = TRUE
+ )
+})
Call the addin and get:
-
# arg_name ----
-## Test 1: arg_name works ----
-test_that("arg_name Test 1: arg_name works", {
-expect_equal(arg_name(sym("a")), "a")
-expect_equal(arg_name(call("enquo", sym("a"))), "a")
-expect_error(arg_name("a"), "Could not extract argument name from")
-})
-
-# convert_dtm_to_dtc ----
-## Test 2: works if dtm is in correct format ----
-test_that("convert_dtm_to_dtc Test 2: works if dtm is in correct format", {
-expect_equal(
-convert_dtm_to_dtc(as.POSIXct("2022-04-05 15:34:07 UTC")),
-"2022-04-05T15:34:07"
-)
-})
-
-## Test 3: Error is thrown if dtm is not in correct format ----
-test_that("convert_dtm_to_dtc Test 3: Error is thrown if dtm is not in correct format", {
-expect_error(
-convert_dtm_to_dtc("2022-04-05T15:26:14"),
-"lubridate::is.instant(dtm) is not TRUE",
- fixed =TRUE
-)
-})
+
# derive_vars_merged ----
+## Test 1: derive_vars_merged ----
+test_that( "derive_vars_merged Test 1: it merges all variables", {
+ actual <- derive_vars_merged(advs,
+ dataset_add = adsl,
+ by_vars = exprs(STUDYID, USUBJID)
+ )
+
+# convert_dtm_to_dtc ----
+## Test 2: works if dtm is in correct format ----
+test_that("convert_dtm_to_dtc Test 2: works if dtm is in correct format", {
+ expect_equal(
+ convert_dtm_to_dtc(as.POSIXct("2022-04-05 15:34:07 UTC")),
+ "2022-04-05T15:34:07"
+ )
+})
+
+## Test 3: Error is thrown if dtm is not in correct format ----
+test_that("convert_dtm_to_dtc Test 3: Error is thrown if dtm is not in correct format", {
+ expect_error(
+ convert_dtm_to_dtc("2022-04-05T15:26:14"),
+ "lubridate::is.instant(dtm) is not TRUE",
+ fixed = TRUE
+ )
+})
Once you have tested your unit test program, you can run all unit
tests from the console, as follows.
Straub B, Bundfuss S, Dickinson J, Farrugia R, Kumari P, Mancini E, Mascary S, Zhu Z (2024).
admiraldev: Utility Functions and Development Tools for the Admiral Package Family.
-R package version 1.0.0.9025,
+R package version 1.0.0.9026,
https://github.com/pharmaverse/admiraldev/, https://pharmaverse.github.io/admiraldev/.
@Manual{,
title = {admiraldev: Utility Functions and Development Tools for the Admiral Package Family},
author = {Ben Straub and Stefan Bundfuss and Jeffrey Dickinson and Ross Farrugia and Pooja Kumari and Edoardo Mancini and Sadchla Mascary and Zelos Zhu},
year = {2024},
- note = {R package version 1.0.0.9025,
+ note = {R package version 1.0.0.9026,
https://github.com/pharmaverse/admiraldev/},
url = {https://pharmaverse.github.io/admiraldev/},
}
Removed dependencies not needed to build package or package documentation. (#426)
Increased minimum R version required to 4.0 to match {admiral}. (#382)
+
addin_format_testthat addin has been moved to {pharmaverse4devs} package. (#419)
diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml
index 348cf2df..a81be7fb 100644
--- a/dev/pkgdown.yml
+++ b/dev/pkgdown.yml
@@ -12,7 +12,7 @@ articles:
test_data_guidance: test_data_guidance.html
unit_test_guidance: unit_test_guidance.html
writing_vignettes: writing_vignettes.html
-last_built: 2024-04-29T12:56Z
+last_built: 2024-05-15T19:28Z
urls:
reference: https://pharmaverse.github.io/admiraldev/reference
article: https://pharmaverse.github.io/admiraldev/articles
diff --git a/dev/reference/add_suffix_to_vars.html b/dev/reference/add_suffix_to_vars.html
index 8d3de43f..473c7347 100644
--- a/dev/reference/add_suffix_to_vars.html
+++ b/dev/reference/add_suffix_to_vars.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/admiraldev-package.html b/dev/reference/admiraldev-package.html
index 692d9f72..d996269a 100644
--- a/dev/reference/admiraldev-package.html
+++ b/dev/reference/admiraldev-package.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/arg_name.html b/dev/reference/arg_name.html
index 6183d7d1..b451d954 100644
--- a/dev/reference/arg_name.html
+++ b/dev/reference/arg_name.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_atomic_vector.html b/dev/reference/assert_atomic_vector.html
index 66100d9d..a3f58d11 100644
--- a/dev/reference/assert_atomic_vector.html
+++ b/dev/reference/assert_atomic_vector.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_character_scalar.html b/dev/reference/assert_character_scalar.html
index a5b6e96d..7272dc3c 100644
--- a/dev/reference/assert_character_scalar.html
+++ b/dev/reference/assert_character_scalar.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_character_vector.html b/dev/reference/assert_character_vector.html
index ce12999d..6f7517c5 100644
--- a/dev/reference/assert_character_vector.html
+++ b/dev/reference/assert_character_vector.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_data_frame.html b/dev/reference/assert_data_frame.html
index 33eb4c34..c10813c1 100644
--- a/dev/reference/assert_data_frame.html
+++ b/dev/reference/assert_data_frame.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_date_var.html b/dev/reference/assert_date_var.html
index c97f6eed..87780f03 100644
--- a/dev/reference/assert_date_var.html
+++ b/dev/reference/assert_date_var.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_date_vector.html b/dev/reference/assert_date_vector.html
index 241980e5..403fa3d1 100644
--- a/dev/reference/assert_date_vector.html
+++ b/dev/reference/assert_date_vector.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_expr.html b/dev/reference/assert_expr.html
index 411990c4..eb25a875 100644
--- a/dev/reference/assert_expr.html
+++ b/dev/reference/assert_expr.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_expr_list.html b/dev/reference/assert_expr_list.html
index cc5dcd24..113fbe4c 100644
--- a/dev/reference/assert_expr_list.html
+++ b/dev/reference/assert_expr_list.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_filter_cond.html b/dev/reference/assert_filter_cond.html
index 109380b1..08048bcb 100644
--- a/dev/reference/assert_filter_cond.html
+++ b/dev/reference/assert_filter_cond.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_function.html b/dev/reference/assert_function.html
index 358dcce9..3525358b 100644
--- a/dev/reference/assert_function.html
+++ b/dev/reference/assert_function.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_function_param.html b/dev/reference/assert_function_param.html
index 3b515dad..ef7d6450 100644
--- a/dev/reference/assert_function_param.html
+++ b/dev/reference/assert_function_param.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_has_variables.html b/dev/reference/assert_has_variables.html
index 7094591b..ae31e36c 100644
--- a/dev/reference/assert_has_variables.html
+++ b/dev/reference/assert_has_variables.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_integer_scalar.html b/dev/reference/assert_integer_scalar.html
index a183b2cc..99c549cb 100644
--- a/dev/reference/assert_integer_scalar.html
+++ b/dev/reference/assert_integer_scalar.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_list_element.html b/dev/reference/assert_list_element.html
index b391b0ca..10ef2906 100644
--- a/dev/reference/assert_list_element.html
+++ b/dev/reference/assert_list_element.html
@@ -14,7 +14,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_list_of.html b/dev/reference/assert_list_of.html
index 7bcd1555..ffcff378 100644
--- a/dev/reference/assert_list_of.html
+++ b/dev/reference/assert_list_of.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_logical_scalar.html b/dev/reference/assert_logical_scalar.html
index 80619c95..12afb56e 100644
--- a/dev/reference/assert_logical_scalar.html
+++ b/dev/reference/assert_logical_scalar.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_named.html b/dev/reference/assert_named.html
index e7bce17d..3edc0d01 100644
--- a/dev/reference/assert_named.html
+++ b/dev/reference/assert_named.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_named_exprs.html b/dev/reference/assert_named_exprs.html
index 34ac30da..e1a63131 100644
--- a/dev/reference/assert_named_exprs.html
+++ b/dev/reference/assert_named_exprs.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_numeric_vector.html b/dev/reference/assert_numeric_vector.html
index c1a4864e..8b3eefa6 100644
--- a/dev/reference/assert_numeric_vector.html
+++ b/dev/reference/assert_numeric_vector.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_one_to_one.html b/dev/reference/assert_one_to_one.html
index 7559830b..fdbf9e04 100644
--- a/dev/reference/assert_one_to_one.html
+++ b/dev/reference/assert_one_to_one.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_param_does_not_exist.html b/dev/reference/assert_param_does_not_exist.html
index ea66a125..96f3f545 100644
--- a/dev/reference/assert_param_does_not_exist.html
+++ b/dev/reference/assert_param_does_not_exist.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_s3_class.html b/dev/reference/assert_s3_class.html
index 9790ea3d..66368287 100644
--- a/dev/reference/assert_s3_class.html
+++ b/dev/reference/assert_s3_class.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_same_type.html b/dev/reference/assert_same_type.html
index 3640801a..5725afab 100644
--- a/dev/reference/assert_same_type.html
+++ b/dev/reference/assert_same_type.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_symbol.html b/dev/reference/assert_symbol.html
index 4f38bbe1..0da5ced4 100644
--- a/dev/reference/assert_symbol.html
+++ b/dev/reference/assert_symbol.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_unit.html b/dev/reference/assert_unit.html
index 2320794b..ff397c77 100644
--- a/dev/reference/assert_unit.html
+++ b/dev/reference/assert_unit.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_vars.html b/dev/reference/assert_vars.html
index c770e650..5bccce49 100644
--- a/dev/reference/assert_vars.html
+++ b/dev/reference/assert_vars.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/assert_varval_list.html b/dev/reference/assert_varval_list.html
index dbe1ae29..151b91b6 100644
--- a/dev/reference/assert_varval_list.html
+++ b/dev/reference/assert_varval_list.html
@@ -14,7 +14,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/backquote.html b/dev/reference/backquote.html
index 1380ca9d..79d19602 100644
--- a/dev/reference/backquote.html
+++ b/dev/reference/backquote.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/contains_vars.html b/dev/reference/contains_vars.html
index 622baa9d..6cc34b1b 100644
--- a/dev/reference/contains_vars.html
+++ b/dev/reference/contains_vars.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/convert_dtm_to_dtc.html b/dev/reference/convert_dtm_to_dtc.html
index 5c3710c8..de71c99d 100644
--- a/dev/reference/convert_dtm_to_dtc.html
+++ b/dev/reference/convert_dtm_to_dtc.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/dataset_vignette.html b/dev/reference/dataset_vignette.html
index bf11c60c..f30a39cb 100644
--- a/dev/reference/dataset_vignette.html
+++ b/dev/reference/dataset_vignette.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/dquote.html b/dev/reference/dquote.html
index dc4bbe1d..d24d8500 100644
--- a/dev/reference/dquote.html
+++ b/dev/reference/dquote.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/enumerate.html b/dev/reference/enumerate.html
index 89d42f9e..2eb91020 100644
--- a/dev/reference/enumerate.html
+++ b/dev/reference/enumerate.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/expect_dfs_equal.html b/dev/reference/expect_dfs_equal.html
index 13edf0c3..36606a5e 100644
--- a/dev/reference/expect_dfs_equal.html
+++ b/dev/reference/expect_dfs_equal.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/expr_c.html b/dev/reference/expr_c.html
index 782f64a5..7bc02c94 100644
--- a/dev/reference/expr_c.html
+++ b/dev/reference/expr_c.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/extract_vars.html b/dev/reference/extract_vars.html
index 80d6e010..c3043412 100644
--- a/dev/reference/extract_vars.html
+++ b/dev/reference/extract_vars.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/filter_if.html b/dev/reference/filter_if.html
index b42b9a72..ecfa0c9b 100644
--- a/dev/reference/filter_if.html
+++ b/dev/reference/filter_if.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/friendly_type_of.html b/dev/reference/friendly_type_of.html
index c1bc8a36..866d2d69 100644
--- a/dev/reference/friendly_type_of.html
+++ b/dev/reference/friendly_type_of.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/get_constant_vars.html b/dev/reference/get_constant_vars.html
index e1401bb9..2807dd0b 100644
--- a/dev/reference/get_constant_vars.html
+++ b/dev/reference/get_constant_vars.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/get_dataset.html b/dev/reference/get_dataset.html
index f57b043f..41f8bbe7 100644
--- a/dev/reference/get_dataset.html
+++ b/dev/reference/get_dataset.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/get_duplicates.html b/dev/reference/get_duplicates.html
index 4b834acb..f44995d7 100644
--- a/dev/reference/get_duplicates.html
+++ b/dev/reference/get_duplicates.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/get_new_tmp_var.html b/dev/reference/get_new_tmp_var.html
index d7cf758e..02e5c9cc 100644
--- a/dev/reference/get_new_tmp_var.html
+++ b/dev/reference/get_new_tmp_var.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/get_source_vars.html b/dev/reference/get_source_vars.html
index 29f6da20..c4ec11b9 100644
--- a/dev/reference/get_source_vars.html
+++ b/dev/reference/get_source_vars.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/grapes-notin-grapes.html b/dev/reference/grapes-notin-grapes.html
index 4904cbe1..f2a2487d 100644
--- a/dev/reference/grapes-notin-grapes.html
+++ b/dev/reference/grapes-notin-grapes.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/grapes-or-grapes.html b/dev/reference/grapes-or-grapes.html
index a2b8fd08..d800392d 100644
--- a/dev/reference/grapes-or-grapes.html
+++ b/dev/reference/grapes-or-grapes.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/index.html b/dev/reference/index.html
index 158ab111..a4238249 100644
--- a/dev/reference/index.html
+++ b/dev/reference/index.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/is_auto.html b/dev/reference/is_auto.html
index 7c9fe571..e72c84e6 100644
--- a/dev/reference/is_auto.html
+++ b/dev/reference/is_auto.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/is_order_vars.html b/dev/reference/is_order_vars.html
index 9a5450a9..6c84525f 100644
--- a/dev/reference/is_order_vars.html
+++ b/dev/reference/is_order_vars.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/is_valid_dtc.html b/dev/reference/is_valid_dtc.html
index faa7e895..471c41a5 100644
--- a/dev/reference/is_valid_dtc.html
+++ b/dev/reference/is_valid_dtc.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/joins.html b/dev/reference/joins.html
index 7c30302c..f93ad35c 100644
--- a/dev/reference/joins.html
+++ b/dev/reference/joins.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/process_set_values_to.html b/dev/reference/process_set_values_to.html
index 92a94a2b..a951e435 100644
--- a/dev/reference/process_set_values_to.html
+++ b/dev/reference/process_set_values_to.html
@@ -14,7 +14,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/remove_tmp_vars.html b/dev/reference/remove_tmp_vars.html
index 5d82ea29..82318355 100644
--- a/dev/reference/remove_tmp_vars.html
+++ b/dev/reference/remove_tmp_vars.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/replace_symbol_in_expr.html b/dev/reference/replace_symbol_in_expr.html
index ed424d1d..9deab18b 100644
--- a/dev/reference/replace_symbol_in_expr.html
+++ b/dev/reference/replace_symbol_in_expr.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/replace_values_by_names.html b/dev/reference/replace_values_by_names.html
index c1a76cf3..0603a87d 100644
--- a/dev/reference/replace_values_by_names.html
+++ b/dev/reference/replace_values_by_names.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/squote.html b/dev/reference/squote.html
index 1a471736..4a20187e 100644
--- a/dev/reference/squote.html
+++ b/dev/reference/squote.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/suppress_warning.html b/dev/reference/suppress_warning.html
index 85894f7a..a138b316 100644
--- a/dev/reference/suppress_warning.html
+++ b/dev/reference/suppress_warning.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/valid_time_units.html b/dev/reference/valid_time_units.html
index 6ec8b7f5..78a4442e 100644
--- a/dev/reference/valid_time_units.html
+++ b/dev/reference/valid_time_units.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/vars2chr.html b/dev/reference/vars2chr.html
index ea508078..ab1f3608 100644
--- a/dev/reference/vars2chr.html
+++ b/dev/reference/vars2chr.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/warn_if_incomplete_dtc.html b/dev/reference/warn_if_incomplete_dtc.html
index 4f11d63e..cef73a16 100644
--- a/dev/reference/warn_if_incomplete_dtc.html
+++ b/dev/reference/warn_if_incomplete_dtc.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/warn_if_inconsistent_list.html b/dev/reference/warn_if_inconsistent_list.html
index b0d99100..bf6ee949 100644
--- a/dev/reference/warn_if_inconsistent_list.html
+++ b/dev/reference/warn_if_inconsistent_list.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/warn_if_invalid_dtc.html b/dev/reference/warn_if_invalid_dtc.html
index 8c7d515b..d390a378 100644
--- a/dev/reference/warn_if_invalid_dtc.html
+++ b/dev/reference/warn_if_invalid_dtc.html
@@ -12,7 +12,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/warn_if_vars_exist.html b/dev/reference/warn_if_vars_exist.html
index 6d84229c..d7e218c7 100644
--- a/dev/reference/warn_if_vars_exist.html
+++ b/dev/reference/warn_if_vars_exist.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/reference/what_is_it.html b/dev/reference/what_is_it.html
index bee0947d..a7dc26de 100644
--- a/dev/reference/what_is_it.html
+++ b/dev/reference/what_is_it.html
@@ -10,7 +10,7 @@
admiraldev
- 1.0.0.9025
+ 1.0.0.9026
diff --git a/dev/search.json b/dev/search.json
index def3c30b..99bed1bf 100644
--- a/dev/search.json
+++ b/dev/search.json
@@ -1 +1 @@
-[{"path":"https://pharmaverse.github.io/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/dev/articles/admiraldev.html","id":"dear-developers","dir":"Articles","previous_headings":"","what":"Dear Developers","title":"Get Started","text":"admiraldev set tools intended , developer, help make developing within admiral family easier, consistently robust across packages maybe even fun! Tools loosely defined follows: Utility Functions used admiral admiral extension functions custom checks providing custom messages, warnings errors. custom messages, warnings errors succinct, helpful messaging around function expects inputs. inputs admiral functions many, generally fit three categories: datasets, variables arguments. functions start assert_, is_ get_. Addins utility functions help documentation, testing checking health code base admiral packages. Vignettes working admiral functions, developing unit testing, releases process, vignette writing documentation needs. vignettes intended use across admiral packages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/admiraldev.html","id":"why-have-a-separate-development-package","dir":"Articles","previous_headings":"","what":"Why have a separate development package?","title":"Get Started","text":"admiral package function base grown decided create extension packages use within companies specific TAs help specific problems. intended extension packages follow processes admiral core, e.g. Unit Testing, Roxygen Documentation, Function Design. standalone development package allows us keep date development process developers across family. also feel lot developer functions user-specific gives us freedom create release utility tools specific family packages reduces non-user facing functions within admiral family packages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/admiraldev.html","id":"how-to-add-new-tools-to-admiraldev","dir":"Articles","previous_headings":"","what":"How to add new tools to {admiraldev}?","title":"Get Started","text":"Just like admiral, follow procedures adding issues discuss feature requests, bugs documentation updates. develop issues branches Pull Request Code Review. Experimental tools highly encouraged help reduce repetitive patterns automating boring stuff.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/admiraldev.html","id":"scenario-one-admiral-core","dir":"Articles","previous_headings":"When to add a function to {admiraldev}?","what":"Scenario One: {admiral} core","title":"Get Started","text":"developer working admiral core implements new type derivation function BDS-Findings ADaM dataset. new derivation function two new assert custom checking functions inputs well helper function. Loose guidelines: derivation function always live admiral core. helper function looked see made available within admiraldev extension packages needs reduce repetitive coding across family admiral. generalized, remain admiral. assert custom checking functions always live within admiraldev stay family assertion functions.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/admiraldev.html","id":"scenario-two-admiral-extension","dir":"Articles","previous_headings":"When to add a function to {admiraldev}?","what":"Scenario Two: {admiral} extension","title":"Get Started","text":"developer working admiralonco implements new type derivation function adding certain parameters oncology specific ADaM dataset. new derivation function one new assert custom checking function. Loose guidelines: derivation function closely looked see can generalized ADaM datasets. case, moved admiral core. function specific oncology needs, remain admiralonco. assert custom checking functions follow similar principle - can generalized therapeutic areas move admiraldev, whereas specific oncology needs, remain admiralonco.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Guidance for git and GitHub Usage","text":"article give overview admiral project utilizing version-control software git website GitHub working RStudio. go primary branches house source code admiral project well use Feature branches address Issues. Issues can range bugs enhancements identified requested developers, users testers. also provide bare minimum git commands needed get running. Please refer Resource section -depth guidance using git GitHub.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"branches","dir":"Articles","previous_headings":"","what":"Branches","title":"Guidance for git and GitHub Usage","text":"main branch contains latest development version package. can find released versions gh-pages branches contains code used render R package websites - looking right now! patch branch reserved special hot fixes address bugs rarely used. info Hot Fix Release main, gh-pages, patch branches protection. try push changes branches get error unless administrator. Feature branches actual development related specific issue happens. Feature branches merged main pull request merged. Check Pull Request Review Guidance guidance merging main.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"working-with-feature-branches","dir":"Articles","previous_headings":"","what":"Working with Feature Branches","title":"Guidance for git and GitHub Usage","text":"Feature Branches developers work addressing Issues.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"implementing-an-issue","dir":"Articles","previous_headings":"Working with Feature Branches","what":"Implementing an Issue","title":"Guidance for git and GitHub Usage","text":"feature branch must related issue. encourage new developers work one issue time.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"naming-branches","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Naming Branches","title":"Guidance for git and GitHub Usage","text":"name branch must prefixed issue number, followed short meaningful description. example, given issue #94 “Program function derive LSTALVDT”, branch name 94_derive_var_lstalvdt.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"create-a-new-feature-branch-from-the-terminal-from-main","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Create a New Feature Branch from the Terminal (from main)","title":"Guidance for git and GitHub Usage","text":"Checkout main branch: git checkout main Pull latest changes GitHub: git pull Create new branch main branch switch : git checkout -b ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"create-a-new-feature-branch-from-github-from-main","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Create a New Feature Branch from GitHub (from main)","title":"Guidance for git and GitHub Usage","text":"can also create feature branch GitHub. Switch main branch Type new feature branch name Click Create branch: @main main Sure Pull newly created branch RStudio","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"commits-from-the-terminal-in-rstudio","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Commits from the Terminal in RStudio","title":"Guidance for git and GitHub Usage","text":"start commit process, need tell git move changes staging area. Use git add move changes staging area wait next commit. can use git add . move files worked staging area. Next can commit, takes snapshot staged changes. committing, prefix message issue number add meaningful message git commit –m '#94 last alive date implementation'. Lastly, push changes GitHub using git push origin ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"commits-from-the-git-tab-in-rstudio","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Commits from the Git Tab in RStudio","title":"Guidance for git and GitHub Usage","text":"can also make use Git Tab within RStudio commit changes. benefit using Tab able see changes file red green highlighting. Just like terminal, start message issue number add meaningful succinct sentence. Hit Commit button Push GitHub.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"commit-message-etiquette","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Commit Message Etiquette","title":"Guidance for git and GitHub Usage","text":"require developers insert issue number commit message. Placing issue number commit message allows reviewers quickly find discussion surrounding issue. pushed GitHub issue number hyperlinked issue tracker, powerful tool discussion traceability, think valuable highly regulated industry like Pharma. styles commit messaging permitted:","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"style-1","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Style 1:","title":"Guidance for git and GitHub Usage","text":"feat: #94 skeleton function developed chore: #94 styler lintr update docs: #94 parameters details sections compelted","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"style-2","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Style 2:","title":"Guidance for git and GitHub Usage","text":"#94 skeleton function developed #94 styler lintr update #94 parameters details sections compelted","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"style-3","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Style 3:","title":"Guidance for git and GitHub Usage","text":"skeleton function developed (#94) styler lintr update (#94) parameters details sections compelted (#94)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"pull-request","dir":"Articles","previous_headings":"Working with Feature Branches","what":"Pull request","title":"Guidance for git and GitHub Usage","text":"recommend thorough read articles, Pull Request Review Guidance Programming Strategy -depth discussions proper Pull Request.Pull Request authors benefit shorter review times closely following guidance provided two articles. discuss simple git commands terminal GitHub Pull Request. recommend Pull Request GitHub terminal. changes committed, push updated branch GitHub:git push -u origin GitHub, Pull requests, user either “Compare pull request” button /“Create Pull Request”. first button created GitHub detects recent changes made. branch merge must main branch (base = main) compare branch new branch merge - shown picture. Please pay close attention branch merging ! issue must linked pull request “Development” field Pull Request. cases, linkage automatically close issue move Done column project board. completed Pull Request see committed changes available reviewer. reviewer must specified Pull Request. recommended write brief summary reviewers can quickly come speed Pull Request. Images updates nice , easy GitHub! Use Screen Capture software Copy Paste summary.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"reviewingclosing-an-issue","dir":"Articles","previous_headings":"Working with Feature Branches > Pull request","what":"Reviewing/Closing an Issue","title":"Guidance for git and GitHub Usage","text":"least one reviewer must approve Pull Request. Please review Pull Request Review Guidance, provides depth guidance proper Pull Request. reviewer must ensure function follows programming strategy recommendations. comment/question/discussion must addressed documented GitHub Pull Request merged review completed, reviewer merge Pull Request feature branch automatically deleted. merging Pull Request please check corresponding moved done column Project Board. Also, please make sure issue closed.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"solving-merge-conflicts-in-the-terminal-on-rstudio","dir":"Articles","previous_headings":"Working with Feature Branches > Pull request","what":"Solving Merge Conflicts in the Terminal on RStudio","title":"Guidance for git and GitHub Usage","text":"Merge conflict situation git decide changes apply since multiple updates part file. typically happens multiple people update part code. conflicts always need handled manually (code updates may required): provides list files conflicts file conflicts conflicting sections marked <<<<<<<, =======, >>>>>>>. code markers must updated markers removed. Source files need updated manually. Generated files like NAMESPACE generated documentation files updated manually recreated source files updated. make changes available call:","code":"git checkout main git pull git checkout git merge main git add git commit -m \"\" git push"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"solving-merge-conflicts-in-github","dir":"Articles","previous_headings":"Working with Feature Branches > Pull request","what":"Solving Merge Conflicts in GitHub","title":"Guidance for git and GitHub Usage","text":"simple merge conflicts, developers can make use GitHub interface solve . GitHub show number conflicts two branches. image, GitHub found 3 conflicts, display first one. Just like terminal, GitHub make use <<<<<<<, =======, >>>>>>> highlight conflicting sections. need make decision whether keep code base feature branch. decided, go code remove section longer wish keep. sure remove <<<<<<<, =======, >>>>>>> well! work conflicts mark Resolved Commit changes. recommended pull branch back RStudio make sure untoward effects happen branch.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"useful-git-commands","dir":"Articles","previous_headings":"Working with Feature Branches","what":"Useful git Commands","title":"Guidance for git and GitHub Usage","text":"merging: git merge - merge my_branch current branch stashing commands useful one wants go back clean directory git stash - stash (store) current changes restore clean directory git stash pop - put back (restore) stashed changes git revert also helpful ? Using code unmerged branches Checkout unmerged branch want use: git checkout Pull latest committed changes unmerged branch: git pull Check feature branch: git checkout Merge unmerged branch : git merge ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"github_resources","dir":"Articles","previous_headings":"","what":"Resources on using git, GitHub and RStudio","title":"Guidance for git and GitHub Usage","text":"GitHub RStudio Happy Git GitHub useR","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/package_extensions.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Package Extensions","text":"admiral made family packages foresee growing time cover specific areas TA (Therapeutic Area) package extensions, wider range companies individuals getting board join development efforts. step--step guidance talks recommendations new development teams go creating package extensions. critical guidance followed, users need feel consistent experience working across admiral packages. admiral package extension doesn’t follow conventions wouldn’t include pharmaverse part admiral family.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/package_extensions.html","id":"step-by-step-guidance-to-create-a-package-extension","dir":"Articles","previous_headings":"","what":"Step-by-step Guidance to Create a Package Extension","title":"Package Extensions","text":"Note: ordering numbers suggested don’t need strictly followed sequence. Raise need new admiral package extension admiral Slack channel, directly admiral package maintainer. naming convention needs {admiralxxx} request scope targeted overly narrow, example instead package extension HIV ’d prefer one across virology. Otherwise number packages may become unmanageable. agreed, reach company contacts working similar areas see collaborative development can achieved. recommendation always target least 2 companies start implementation remains robust protect going company-specific route. However, consider 4 5 companies get involved early may slow decision-making. companies agree co-develop, identify lead . One company act driver overall package extension put forward product owner technical lead ultimately final say contentious decisions. product owner cover project decisions (e.g. around scope priorities), whereas technical lead cover technical decisions (e.g. around design implementation). technical lead either: ) already significantly involved admiral core development team developer/contributor, b) join core development team simultaneously. ensure design kept true manifesto consistent style quality respect admiral standards. Agree charter expectations company, e.g. usually ask least 3 developers least 25% capacity mix R, GitHub TA experience. Within charter make sure scope timelines clear. important try boil ocean. Focus first common endpoints required foundation package can build via contributions co-development companies also wider across-industry admiral community. useful, admiralonco charter shared guide. company start identify required developer resources. developer required complete {admiral} dummy issue onboarding, well reading admiraldev documentation, - especially developer guides, need followed package extensions. Optionally can useful host kick-meeting decide team work, recommend agile/scrum practices. Set “admiralxxx_dev” channel Slack add team members informal team chat, agree way share working documents across co-development team. recommend use new folder pharmaverse MS Teams - Michael Rimler (michael.s.rimler@gsk.com) help rep PHUSE board. useful starter development activity look pharmaversesdtm check test data sufficient TA needs, e.g. admiralonco generate new test data SDTM domains RS TU. Note personal data used (even anonymized) important keep data generated -line CDISC pilot data use , .e. use USUBJIDs DM etc. Optionally draft, agree sign collaboration agreement collaborating companies wish, useful protecting secondary IP company standard specifications may shared within team. example stored , work Legal teams required. Share company-specific implementations specifications able harmonize design strategy package extension. important remain pragmatic consider higher perspective one company. Engage company standards representatives find discrepancies across company approaches question really need things differently (health authorities patients benefit ?). Also consider always expect level company-specifics covered internal company package extensions. Set new public GitHub repo pharmaverse org using admiraltemplate - includes set-pieces (CI/CD checks issue/PR templates) enable package stay consistent others admiral family, well core package dependencies versions. See {admiraltemplate} Quick Start Guide Note step requires org member access granted pharmaverse council reps, admins org. Also free add additional package dependencies needed assuming reliable packages used, must depend newer versions packages (always reply “” updates suggested installation). repo available technical lead granted admin access repo set GitHub team name package extension assign required access co-development team members. require write access, may choose give leads admin access well never bottle-neck waiting one person. Update template license file repo adding co-development company names place Roche & GSK - admiral package extensions use Apache 2.0, preferred permissive license. Agree co-development companies required extra wording copyright/IP section. Set project board, , help manage backlog. Assuming work agile/scrum, create product backlog, prioritize make sprint plan. intention always re-use much possible admiral core package. find anything additional needed package extension, first question whether might common need TAs consider instead raising issue admiral core. designing new functions always try stay aligned Programming Strategy. Start development foundational first release 0.1.0. Follow consistent Development Process admiral. Line testers companies others set expectations around believe stable version available user testing. can use admiral Slack community raise interest get involved. Add pharmaverse badge README: https://pharmaverse.org/contribute/badges/ - needs support pharmaverse council rep. Raise admiral repo issue ensure package extension site linked core admiral site .` important admiral family packages keep similar release schedule cadence, order ease adoption users give clear expectations. admiral core package cadence releases one every quarter fixed schedule (every first Monday last month quarter - March, June, September, December). core package set release schedule package extensions follow, .e. admiral releases ’d expect package extension releases targeted within 2 week window. releases communicated via Slack channel well quarterly user community meetings. happy package extension well tested sufficient state make submission CRAN. technical lead named maintainer. CRAN release, advertise via Slack & LinkedIn. Plan future enhancements make issues. team feels ready can open development contributions wider community - see page. Please use good first issue (ideal new starters) & help wanted (ideal experienced contributors) issue labels. Note: core admiral team carry periodic reviews extension package contents ensure nothing duplicated ensure standards best practices followed. frequency reviews agreed upon technical leads core extension packages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/package_extensions.html","id":"lessons-learned","dir":"Articles","previous_headings":"","what":"Lessons Learned","title":"Package Extensions","text":"lessons learned previous package extensions: Since ADaM conceived TA-agnostic, TA standards can widely differ across companies, TA package extensions shouldn’t contain many new functions. , functionality required create ADaM present admiral, localized limited exceptions truly TA-specific variables/endpoints. , R folder package extensions relatively lean! Connected , package extension just R functions - also vignettes examples template programs. fact, just important R functions , users turn guidance. Making sure package always --date respect new admiral releases (e.g. due deprecation functions) crucial task. Maintaining package long-term way ensure success. Beware developing just sake developing! may find reach point stasis extension package journey, much need new development. case, vital avoid working tangential tasks. Instead, focus ensuring existing fit--purpose possible.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Pull Request Review Guidance","text":"document intended guidance creators reviewers pull requests (PRs) admiral package family. PR authors benefit shorter review times closely following guidance provided . pull request main branch signifies issue “addressed”. issue might bug, feature request documentation update. Pull Request merged main branch, issue(s) can closed. Closely following guidance ensure “addressed” issues auto-close merge main.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"review-criteria","dir":"Articles","previous_headings":"","what":"Review Criteria","title":"Pull Request Review Guidance","text":"pull request merged main needs pass automated CI checks appear bottom Pull Request. addition, PR creator reviewer make sure Programming Strategy Development Process followed function ADaM IG compliant function intended (described header corresponding issue) function header properly explains intention function, expected inputs (incl. permitted values parameters) output produced; reading documentation reader able predict output function without read source code function accompanying set unit tests; derivations unit test code coverage least 90%; whole package coverage >= 80% implemented derivation scope admiral, e.g. expect company specific input hard-code company-specific rules meaningful error warning messages issued input invalid documentation created/updated running devtools::document() functions supposed exported listed NAMESPACE file; requires @export tag function header examples print relevant source variables newly created variables /records output NEWS.md file updated entry explains new features changes change user-specific warrants mention development milestone files affected implemented changes, e.g. vignettes templates, updated","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"codeowners-and-pr-guidance","dir":"Articles","previous_headings":"Review Criteria","what":"Codeowners and PR Guidance","title":"Pull Request Review Guidance","text":"creator PR, assignment reviewer can unclear. PRs, feel free select members core development team. individuals scan repository regular basis well may provide /review even originally included selected reviewer. Sometimes, development function vignette falls specific-topic, e.g. labs PK/PD. Please ensure include appropriate reviewer modifying files rely domain-expertise. try maintain active list domain-specific topics automatically tag appropriate reviewer using CODEOWNERS file, located .github folder. interested codeowner, reach development team.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"so-much-red-tape","dir":"Articles","previous_headings":"","what":"So much Red Tape!","title":"Pull Request Review Guidance","text":"admiral development team aware sympathetic great many checks, processes documents needed work order compliant Pull Request. task-list-completed GitHub workflow created help reduce burden contributors providing standardized checklist compiles information Pull Request Review Guidance, Programming Strategy Development Process vignettes. next three sections give high-level overview contributor faces opening PR, contributor interacts task-list-completed workflow PR.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"open-a-pull-request","dir":"Articles","previous_headings":"So much Red Tape!","what":"Open a Pull Request","title":"Pull Request Review Guidance","text":"contributor opens PR lengthy standard text inserted comment section. Please alter automated text. need manually add Closes # title Pull Request. can use Edit button top right forget step start Pull Request. Besides free add additional textual information, screenshots, etc. bottom automated text needed clarify contribute discussion around PR.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"create-a-pull-request","dir":"Articles","previous_headings":"So much Red Tape!","what":"Create a Pull Request","title":"Pull Request Review Guidance","text":"click green Create pull request button automated text inserted turned checklist Pull Request. check box drawn previously mentioned vignettes presented recommended sequence. check boxes meant helpful aid ensuring created compliant Pull Request.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"complete-the-pull-request-checklist","dir":"Articles","previous_headings":"So much Red Tape!","what":"Complete the Pull Request checklist","title":"Pull Request Review Guidance","text":"check boxes linked task-list-completed workflow. need check box acknowledgment done due diligence creating compliant Pull Request. GitHub refresh Pull Request trigger task-list-completed workflow completed task. PR can merged main contributor checked check box items. Please don’t hesitate reach admiral team Slack GitHub Issues tracker think checklist needs amended clarity needed check box item. Note Reviewers: recommend use Squash Merge merging Pull Request. create clean commit history.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"github-actionsci-workflows","dir":"Articles","previous_headings":"","what":"GitHub Actions/CI Workflows","title":"Pull Request Review Guidance","text":"task-list-completed workflow one several workflows/actions used within admiral. workflows live .github/workflows folder important understand use remedy workflow fails. Workflows defined responsible assuring high package quality standards without compromising performance, security, reproducibility.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"a-synopsis-of-admirals-workflows","dir":"Articles","previous_headings":"GitHub Actions/CI Workflows","what":"A synopsis of admiral’s workflows","title":"Pull Request Review Guidance","text":"recommend checking README admiralci repository gain understanding workflows/actions used admiral.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Programming Strategy","text":"admiral intended contributed user community, article meant developers want either expand admiral functionalities build top admiral. order keep framework robust across whole community, defined programming strategy followed cases. contributions include, example, company specific derivations ADaM datasets.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"functional-workflow","dir":"Articles","previous_headings":"","what":"Functional Workflow","title":"Programming Strategy","text":"Overall programming follow functional approach. mandate use tidyverse (e.g. dplyr) similar functionality existing base R ADaM dataset built set functions free flow code. ADaM dataset specific programming workflow. function specific purpose supports ADaM Dataset programming workflow. admiral function company specific function. Admiral functions can re-used company specific functions. function belongs one category defined keywords/family. function used derive one multiple variable(s) required unit tested. Functions standard naming convention. Double coding used QC method (absolutely necessary). ADaMs created readable, submission-ready code.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function-design","dir":"Articles","previous_headings":"Functions in R","what":"Function Design","title":"Programming Strategy","text":"Firstly, important explain decide need new derivation functions. derivation rule algorithm common highly similar across different variables/parameters (e.g. study day duration) provide generic function can used satisfy times may needed across different ADaMs. Similarly, feel certain derivation useful beyond single purpose also provide generic function (e.g. instead last known alive date function, extreme date function user find last date selection, example first). Otherwise, feel derivation rule unique need sufficiently complex justify opt dedicated function specific variable/parameter (e.g. treatment-emergent flag AEs). certain variables closely connected (e.g. imputed date corresponding imputation flag) single function provide variables. something needed ADaM achieved simply via existing tidyverse function, wrap admiral function, add unnecessary extra layer users. following principles key designing new function: Modularity - code follows modular approach, .e. steps must clearly separated dedicated purpose. applies scripts creating dataset module create single variable parameter. also complex derivations several steps. Commenting steps key readability. Avoid Copy Paste - similar code used multiple times, put separate function. improves readability maintainability makes unit testing easier. done every simple programming step tidyverse can used. rather computational functions data checks. However, also consider nest many functions. Checks - Whenever function fails, meaningful error message must provided clear reference input caused failure. users dig detailed code want apply function. meaningful error message supports usability. Flexibility - Functions flexible possible long reduce usability. example: source variables newly created variables conditions selecting observations hard-coded. useful argument triggers optional steps, e.g. filter argument specified, input dataset restricted, otherwise step skipped. However, arguments trigger completely different algorithms. example BNRIND derived based BASE based ANRIND. implemented within one function algorithms completely different. BASE used, values categorized ANRIND used, values merged baseline observation.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"input-output-and-side-effects","dir":"Articles","previous_headings":"Functions in R","what":"Input, Output, and Side-effects","title":"Programming Strategy","text":"behavior function determined input, global object, .e. input like datasets, variable names, options, … must provided function arguments. expected input datasets grouped. grouped, function must issue error. function requires grouping, function must provide by_vars argument. output dataset must ungrouped. functions sort (arrange) output dataset end. function needs create temporary variables input dataset, names variables must generated get_new_tmp_var() avoid variables input dataset accidentally overwritten. temporary variables must removed output dataset calling remove_tmp_vars(). developers find need use create environment objects achieve flexibility, use admiral_environment environment object created admiral_environment.R. objects stored environment must documented admiral_environment.R. equivalent environment object .R file exist admiraldev well. details environments work, see relevant sections environments R Packages Advanced R textbooks. general, function must side-effects like creating modifying global objects, printing, writing files, …","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"admiral-options","dir":"Articles","previous_headings":"Functions in R","what":"Admiral Options","title":"Programming Strategy","text":"exception made admiral options, see get_admiral_option() set_admiral_options(), certain pre-defined defaults added flexibility allow user-defined defaults commonly used function arguments e.g. subject_keys currently pre-defined exprs(STUDYID, USUBJID), can modified using set_admiral_options(subject_keys = exprs(...)) top script. reasoning behind relieve user repeatedly changing aforementioned commonly used function arguments multiple times script, may called across many admiral functions. additional flexibility needs added another commonly used function argument e.g. future_input set exprs(...) can added admiral option. function formals define future_input = get_admiral_option(\"future_input\") proceed modify body roxygen documentation set_admiral_options().","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function-names","dir":"Articles","previous_headings":"Functions in R","what":"Function Names","title":"Programming Strategy","text":"Function names start verb use snake case, e.g. derive_var_base(). Please note appropriate var/vars prefix used cases function creates variable(s), regardless presence new_var argument function call. Oftentimes creating new derive_var derive_param function may sort non-trivial calculation involved may want write customized function . creating compute_ function becomes appropriate, calculation portion contained one step part overall derive_ function, reducing clutter main function body assisting debugging. addition, compute_ function implemented calculation used one derivation. example compute_bmi() used derive baseline BMI variable ADSL (based baseline weight baseline height variables) also used derive BMI parameter ADVS (based weight height parameters). Please see compute_age_years() derive_var_age_years() another example.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function-arguments","dir":"Articles","previous_headings":"Functions in R","what":"Function Arguments","title":"Programming Strategy","text":"default value optional arguments NULL. recommended argument order contributors asked adhere (order keep consistency across functions): dataset (additional datasets denoted dataset_*) by_vars order new_var (related new_var_* arguments) filter (additional filters denoted filter_*) Make sure always mention start_date end_date (related). Names variables inside dataset passed symbols rather strings, .e. AVAL rather \"AVAL\". argument accepts one variables expressions input variables expressions wrapped inside exprs(). example: new_var = TEMPBL by_vars = exprs(PARAMCD, AVISIT) filter = PARAMCD == \"TEMP\" order = exprs(AVISIT, desc(AESEV)) new_vars = exprs(LDOSE = EXDOSE, LDOSEDT = convert_dtc_to_dt(EXSTDTC)) function argument needs tested assert_ type function. expression needs tested following (many utility functions admiral available contributor): whether expression (list expressions, depending function) whether valid expression (.e. whether evaluates without error)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"common-function-arguments-naming-convention","dir":"Articles","previous_headings":"Functions in R","what":"Common Function Arguments Naming Convention","title":"Programming Strategy","text":"first argument derive_ functions input dataset named dataset. one input dataset required, input dataset start dataset_, e.g., dataset_ex. Arguments specifying items add start new_. variable added, second part argument name var, parameter added, param. example: new_var, new_var_unit, new_param. Arguments expect boolean boolean vector must start verb, e.g., is_imputed impute_date. Arguments expect one value variable name must singular version word(s), e.g., missing_value new_var. Arguments expect several values variable names (list, expressions, etc.) must plural version word(s), e.g., missing_values new_vars.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"source-code-formatting","dir":"Articles","previous_headings":"Functions in R","what":"Source Code Formatting","title":"Programming Strategy","text":"source code formatted according tidyverse style guide. lintr styler packages used check enforce .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"comments","dir":"Articles","previous_headings":"Functions in R","what":"Comments","title":"Programming Strategy","text":"Comments added help readers author understand code. two main cases: intention chunk code clear, comment added. comment rephrase code provide additional information. Bad Good long functions (>100 lines) comments can added structure code simplify navigation. case comment end ---- add entry document outline RStudio. example: formatting comments must follow tidyverse style guide. .e., comment start single # space. decoration (except outline entries) must added. Bad Good","code":"# If AVAL equals zero, set it to 0.0001. Otherwise, do not change it mutate(dataset, AVAL = if_else(AVAL == 0, 0.0001, AVAL)) # AVAL is to be displayed on a logarithmic scale. # Thus replace zeros by a small value to avoid gaps. mutate(dataset, AVAL = if_else(AVAL == 0, 0.0001, AVAL)) # Check arguments ---- # This is a comment # ########################### # This is another comment # ########################### #+++++++++++++++++++++++++++++++ # This is a section comment ---- #+++++++++++++++++++++++++++++++ # This is a comment # This is another comment # This is a section comment ----"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"input-checking","dir":"Articles","previous_headings":"Functions in R","what":"Input Checking","title":"Programming Strategy","text":"line fail-fast design principle, function inputs checked validity , ’s invalid input, function stop immediately error. exception case variable added function already exists input dataset: warning displayed function continue executing. Inputs checked using custom assertion functions defined R/assertions.R. custom assertion functions either return error case invalid input return nothing. common types input arguments like single variable, list variables, dataset, … functions checking available (see assertions). Arguments expect keywords handle case-insensitive manner, e.g., date_imputation = \"FIRST\" date_imputation = \"first\" accepted. assert_character_scalar() function helps handling arguments case-insensitive manner. argument checked outer function argument name inner function. rule applicable functions part admiral.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function-header-documentation","dir":"Articles","previous_headings":"Functions in R","what":"Function Header (Documentation)","title":"Programming Strategy","text":"Every function exported package must accompanying header formatted according roxygen2 convention. addition standard roxygen2 tags, @family @keywords tags also used. family/keywords used categorize function, used website internal package help pages. Please see section Categorization functions. example given : following fields mandatory: @param: One entry per function argument. following attributes described: expected data type (e.g. data.frame, logical, numeric etc.), permitted values (applicable), optionality (.e. required argument). expected input dataset required variables clearly stated. Describing default value becomes difficult maintain subject manual error already declared function arguments. description permitted values written separate line italicizing phrase “Permitted Values”, example : @details: natural-language description derivation used inside function. @keyword: One applicable tag function - identical family. @family: One applicable tag function - identical keyword. @return: description return value function. newly added variable(-s) mentioned . @examples: fully self-contained example use function. Self-contained means , code executed new R session, run without errors. means packages need loaded library() datasets needed either created directly inside example code loaded using data(). dataset created example, done using function tribble() (specify library(dplyr) calling function). functions called example, please specify library(pkg_name) refer respective function fun() opposed preferred pkg_name::fun() notation specified Unit Test Guidance. Make sure align columns ensures quick code readability. Copying descriptions avoided makes documentation hard maintain. example argument description used one function, argument described one function functions use @inheritParams . Please note @inheritParams func_first used header func_second() function, argument descriptions func_first() included documentation func_second() argument offered func_second() @param tag argument included header func_second(). order @param tags function definition. @inheritParams tags @param. affect order argument description rendered documentation makes easier maintain headers. Variable names, expressions, functions, code must enclosed backticks. render code. functions derive specific CDISC variable, title must state label variable without variable name. variable stated description.","code":"#' Derive Relative Day Variables #' #' Adds relative day variables (`--DY`) to the dataset, e.g., `ASTDY` and #' `AENDY`. #' #' @param dataset Input dataset #' #' The columns specified by the `reference_date` and the `source_vars` #' argument are expected. #' #' @param reference_date The start date column, e.g., date of first treatment #' #' A date or date-time object column is expected. #' #' Refer to `derive_var_dt()` to impute and derive a date from a date #' character vector to a date object. #' #' @param source_vars A list of datetime or date variables created using #' `exprs()` from which dates are to be extracted. This can either be a list of #' date(time) variables or named `--DY` variables and corresponding --DT(M) #' variables e.g. `exprs(TRTSDTM, ASTDTM, AENDT)` or `exprs(TRTSDT, ASTDTM, #' AENDT, DEATHDY = DTHDT)`. If the source variable does not end in --DT(M), a #' name for the resulting `--DY` variable must be provided. #' #' @details The relative day is derived as number of days from the reference #' date to the end date. If it is nonnegative, one is added. I.e., the #' relative day of the reference date is 1. Unless a name is explicitly #' specified, the name of the resulting relative day variable is generated #' from the source variable name by replacing DT (or DTM as appropriate) with #' DY. #' #' @return The input dataset with `--DY` corresponding to the `--DTM` or `--DT` #' source variable(s) added #' #' @keywords der_date_time #' @family der_date_time #' #' @export #' #' @examples #' library(lubridate) #' library(dplyr, warn.conflicts = FALSE) #' #' datain <- tribble( #' ~TRTSDTM, ~ASTDTM, ~AENDT, #' \"2014-01-17T23:59:59\", \"2014-01-18T13:09:O9\", \"2014-01-20\" #' ) %>% #' mutate( #' TRTSDTM = as_datetime(TRTSDTM), #' ASTDTM = as_datetime(ASTDTM), #' AENDT = ymd(AENDT) #' ) #' #' derive_vars_dy( #' datain, #' reference_date = TRTSDTM, #' source_vars = exprs(TRTSDTM, ASTDTM, AENDT) #' ) #' *Permitted Values*: example description of permitted values here"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"categorization-of-functions","dir":"Articles","previous_headings":"Functions in R","what":"Categorization of Functions","title":"Programming Strategy","text":"functions categorized keywords families within roxygen header. Categorization important admiral user-facing functions base totals 125 growing! However, ease burden developers, decided keywords families identical roxygen header, specified via @keywords @family fields. reiterate, function must use keyword family. Also, please note keywords families case-sensitive.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"keywords","dir":"Articles","previous_headings":"Functions in R > Categorization of Functions","what":"@keywords","title":"Programming Strategy","text":"keywords allows reference page easily organized using certain pgkdown functions. example, using function has_keyword(der_bds_gen) _pkgdown.yml file building website collect BDS General Derivation functions display alphabetical order Reference Page section called BDS-Specific.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"family","dir":"Articles","previous_headings":"Functions in R > Categorization of Functions","what":"@family","title":"Programming Strategy","text":"families allow similar functions displayed See Also section function’s documentation. example, user looking derive_vars_dy() function documentation might interested Date/Time functions. Using @family tag der_date_time display Date/Time functions available admiral user See Also section derive_vars_dy() function documentation. Please take look function documentation derive_vars_dy() see family tag action. list available keyword/family tags used admiral functions. think additional keyword/family tag added, please add issue GitHub discussion. NOTE: strongly encouraged @keyword @family identical. eases burden development maintenance admiral functions. need use multiple keywords families, please reach core development team discussion.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"missing-values","dir":"Articles","previous_headings":"","what":"Missing values","title":"Programming Strategy","text":"Missing values (NAs) need explicitly shown. Regarding character vectors converted SAS files: SAS treats missing character values blank. imported R empty strings (\"\") although nature missing values (NA). empty strings originate like need converted proper R missing values NA.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"file-structuring","dir":"Articles","previous_headings":"","what":"File Structuring","title":"Programming Strategy","text":"Organizing functions files art science. Thus, hard rules just recommendations. First foremost, two extremes avoided: putting function file putting functions single file. Apart following recommendations taken consideration deciding upon file structuring: function long (together documentation), store separate file functions documented together, put one file functions sort commonality relevance one another (like dplyr::bind_rows() dplyr::bind_cols()), put one file Store functions together helpers methods 1000 lines single file, unless necessary (exceptions , example, classes methods) responsibility author new function reviewer ensure recommendations put practice.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"r-package-dependencies","dir":"Articles","previous_headings":"","what":"R Package Dependencies","title":"Programming Strategy","text":"Package dependencies documented DESCRIPTION file. package used examples /unit tests listed Suggests, otherwise Imports. Functions packages explicitly imported using @importFrom tag R/admiral-package.R file. import if_else() mutate() function dplyr following line included file: #' @importFrom dplyr if_else mutate. using @importFrom tag, easier track dependencies one place improves code readability. functions become critically important using admiral included export. applies functions frequently called within {admiral }function calls like rlang::exprs(), dplyr::desc() pipe operator dplyr::%>%. export functions, following R code included R/reexports.R file using format:","code":"#' @export pkg_name::fun"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"metadata","dir":"Articles","previous_headings":"","what":"Metadata","title":"Programming Strategy","text":"Functions perform derivation logic add kind metadata, e.g. labels.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"unit-testing","dir":"Articles","previous_headings":"","what":"Unit Testing","title":"Programming Strategy","text":"function requires set unit tests verify produces expected result. See Writing Unit Tests {admiral} details.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"deprecation","dir":"Articles","previous_headings":"","what":"Deprecation","title":"Programming Strategy","text":"admiral still evolving, functions arguments may need removed replaced efficient options one release another. cases, relevant function argument must marked deprecated. deprecation done three phases release cycles. Phase 1: release identified function argument deprecated warning issued using function argument using deprecate_warn(). Phase 2: next release error thrown using deprecate_stop(). Phase 3: Finally 3rd release thereafter function removed package altogether. Information deprecation timelines must added warning/error message. Note deprecation cycle time function argument based current release schedule 6 months.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"documentation","dir":"Articles","previous_headings":"Deprecation","what":"Documentation","title":"Programming Strategy","text":"function argument removed, documentation must updated indicate function argument now deprecated new function/argument used instead. documentation updated : description level function, @keywords @family roxygen tags replaced deprecated @examples section removed. @param level argument.","code":"#' Title of the function #' #' @description #' `r lifecycle::badge(\"deprecated\")` #' #' This function is *deprecated*, please use `new_fun()` instead. #' . #' @family deprecated #' #' @keywords deprecated #' . @param old_param *Deprecated*, please use `new_param` instead."},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"handling-of-warning-and-error","dir":"Articles","previous_headings":"Deprecation","what":"Handling of Warning and Error","title":"Programming Strategy","text":"function argument deprecated, function must updated issue warning error using deprecate_warn() deprecate_stop(), respectively, described . test case added test file function checks whether warning/error issued appropriate using deprecated function argument.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function","dir":"Articles","previous_headings":"Deprecation > Handling of Warning and Error","what":"Function","title":"Programming Strategy","text":"initial release function deprecated original function body must replaced call deprecate_warn() subsequently arguments passed new function. following release function body changed just include call deprecate_stop(). Finally, next release function removed package.","code":"fun_xxx <- function(dataset, some_param, other_param) { deprecate_warn(\"x.y.z\", \"fun_xxx()\", \"new_fun_xxx()\") new_fun_xxx( dataset = dataset, some_param = some_param, other_param = other_param ) } fun_xxx <- function(dataset, some_param, other_param) { deprecate_stop(\"x.y.z\", \"fun_xxx()\", \"new_fun_xxx()\") }"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"argument","dir":"Articles","previous_headings":"Deprecation > Handling of Warning and Error","what":"Argument","title":"Programming Strategy","text":"argument removed replaced, error must generated: argument renamed replaced, warning must issued new argument takes value old argument next release. Note: arguments passed exprs() argument (e.g. new_var = VAR1 filter = AVAL >10) need quoted.","code":"### BEGIN DEPRECATION if (!missing(old_param)) { deprecate_stop(\"x.y.z\", \"fun_xxx(old_param = )\", \"fun_xxx(new_param = )\") } ### END DEPRECATION ### BEGIN DEPRECATION if (!missing(old_param)) { deprecate_warn(\"x.y.z\", \"fun_xxx(old_param = )\", \"fun_xxx(new_param = )\") # old_param is given using exprs() new_param <- old_param # old_param is NOT given using exprs() new_param <- enexpr(old_param) } ### END DEPRECATION"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"unit-testing-1","dir":"Articles","previous_headings":"Deprecation","what":"Unit Testing","title":"Programming Strategy","text":"Unit tests deprecated functions arguments must added test file 1 function ensure warning error issued. writing unit test, check error warning right class, .e., \"lifecycle_error_deprecated\" \"lifecycle_warning_deprecated\", respectively. unit-test follow corresponding format, per unit test guidance.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"for-deprecated-functions-that-issues-a-warning-phase-1","dir":"Articles","previous_headings":"Deprecation > Unit Testing","what":"For Deprecated Functions that Issues a Warning (Phase 1)","title":"Programming Strategy","text":"unit test like following must added. existing unit tests call deprecated function need enclosed suppress_warning(). example, regexpr argument must specified ensure deprecation warning suppressed.","code":"## Test #: deprecation warning if function is called ---- test_that(\"derive_var_example() Test #: deprecation warning if function is called\", { expect_warning( derive_var_example(), class = \"lifecycle_warning_deprecated\" ) }) actual <- suppress_warning( derive_var_example(), regexpr = \"was deprecated\" )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"for-deprecated-functions-that-issues-an-error-phase-2","dir":"Articles","previous_headings":"Deprecation > Unit Testing","what":"For Deprecated Functions that Issues an Error (Phase 2)","title":"Programming Strategy","text":"unit test like following must added. unit tests deprecated function must removed.","code":"## Test #: error if function is called ---- test_that(\"derive_var_example() Test #: deprecation error if function is called\", { expect_error( derive_var_example(), class = \"lifecycle_error_deprecated\" ) })"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"best-practices-and-hints","dir":"Articles","previous_headings":"","what":"Best Practices and Hints","title":"Programming Strategy","text":"Please take following list recommendation try adhere rules possible. Arguments function calls named except first parameter (e.g. assert_data_frame(dataset, required_vars = exprs(var1, var2), optional = TRUE)). dplyr::if_else() used two conditions. Try always set missing argument whenever appropriate.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"how-quoting-is-used","dir":"Articles","previous_headings":"Best Practices and Hints","what":"How Quoting is used","title":"Programming Strategy","text":"admiral arguments require selecting one particular option like mode, e.g. mode = \"last\". Use quotation marks capture . expected assertion function corresponding arguments assert_character_scalar()/assert_character_vector(). Many admiral arguments require capturing expression, typically encased exprs() statement, evaluated later inside function body, see arguments like new_vars, e.g. new_vars = exprs(TRTSDTM = EXSTDTM). Oftentimes, assertion function corresponding assert_expr()/assert_expr_list(). arguments unquoted using !!!. admiral arguments like new_var filter expect single variable expression quoted call. function body, quoted using enexpr(). Usually combined assertion, e.g., new_var <- assert_symbol(enexpr(new_var)). arguments unquoted using !!. Keep mind !! one--one replacement !!! one--many replacement. Please see chapter Advanced R textbook details.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"standardizing-text-used-to-label-and-describe-arguments","dir":"Articles","previous_headings":"Best Practices and Hints","what":"Standardizing Text Used to Label and Describe Arguments","title":"Programming Strategy","text":"following PR, find example function argument dataset able standardized Label Description said function argument aligned across codebase. Please see changes file derive_adeg_params.R details. benefits programmatic way write documentation changes need made, making modification corresponding function, case, roxygen_param_dataset(), scales across codebase, can tested, less prone user-error typos grammar mistakes. functions implemented roxygen2.R naming convention argument follows roxygen_param_xxx(), “xxx” replaced argument name.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"r-and-package-versions-for-development","dir":"Articles","previous_headings":"","what":"R and Package Versions for Development","title":"Programming Strategy","text":"choice R Version set stone. However, common development environment important establish working across multiple companies multiple developers. currently work earliest three latest R Versions. need common development environment also carries choice package versions. GitHub allows us Actions/Workflows test admiral several versions R well several versions dependent R packages needed admiral. Currently test admiral three latest R Versions closest snapshots packages R versions. can view workflow others admiralci GitHub Repository. common development allows us easily re-create bugs provide solutions issues developers encounter. Reviewers Pull Requests running code know environment identical initiator Pull Request. ensures faster review times higher quality Pull Request reviews. achieve common development environment using lockfile created renv package. New developers encounter suggested renv::restore() console revert move forward R version package versions.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"common-r-cmd-check-issues","dir":"Articles","previous_headings":"","what":"Common R CMD Check Issues","title":"R CMD Issues","text":"R CMD check command line tool checks R packages standard set criteria. pull request pass check must issue notes, warnings errors. list common issues resolve .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"check-fails-only-on-one-version","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Check Fails Only on One Version","title":"R CMD Issues","text":"R CMD check workflow fails one two R versions can helpful reproduce testing environment locally. reproduce particular R version environment open admiral project corresponding R version, comment line source(\"renv/activate.R\") .Rprofile file, restart R session run following commands R console. ensure exact package versions use workflow installed hidden folder .library. way existing R packages overwritten.","code":"Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS = \"true\") if (!dir.exists(\".library\")) { dir.create(\".library\") } base_recommended_pkgs <- row.names(installed.packages(priority = \"high\")) for (pkg in base_recommended_pkgs) { path <- file.path(.Library, pkg) cmd <- sprintf(\"cp -r %s .library\", path) system(cmd) } assign(\".lib.loc\", \".library\", envir = environment(.libPaths)) r_version <- getRversion() if (grepl(\"^4.1\", r_version)) { options(repos = \"https://packagemanager.posit.co/cran/2021-05-03/\") } else if (grepl(\"^4.2\", r_version)) { options(repos = \"https://packagemanager.posit.co/cran/2022-01-03/\") } else if (grepl(\"^4.3\", r_version)) { options(repos = \"https://packagemanager.posit.co/cran/2023-04-20/\") } else { options(repos = \"https://cran.rstudio.com\") } if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_deps(dependencies = TRUE) remotes::install_github(\"pharmaverse/pharmaversesdtm\", ref = \"devel\") remotes::install_github(\"pharmaverse/admiraldev\", ref = \"devel\") rcmdcheck::rcmdcheck()"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"package-dependencies","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Package Dependencies","title":"R CMD Issues","text":"Add pkg Imports Suggests field DESCRIPTION file. general, dependencies listed Imports field. However, package used inside vignettes unit tests listed Suggests admiral functions work without “soft” dependencies installed.","code":"> checking package dependencies ... ERROR Namespace dependency not required: ‘pkg’"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"global-variables","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Global Variables","title":"R CMD Issues","text":"Add some_var list “global” variables R/globals.R.","code":"❯ checking R code for possible problems ... NOTE function_xyz: no visible binding for global variable ‘some_var’"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"undocumented-function-parameter","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Undocumented Function Parameter","title":"R CMD Issues","text":"Add @param some_param section header function_xyz() run devtools::document() afterwards.","code":"❯ checking Rd \\usage sections ... WARNING Undocumented arguments in documentation object 'function_xyz' ‘some_param’"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"outdated-documentation","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Outdated Documentation","title":"R CMD Issues","text":"name parameter changed function code yet header. Change @param old_param_name @param new_param_name run devtools::document(). reading recommend R-pkg manual r-cmd chapter","code":"❯ checking for code/documentation mismatches ... WARNING Codoc mismatches from documentation object 'function_xyz': ... Argument names in code not in docs: new_param_name Argument names in docs not in code: old_param_name Mismatches in argument names: Position: 6 Code: new_param_name Docs: old_param_name"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Release Strategy","text":"article explains package releases admiral across package extensions. includes details around planned/scheduled releases, well hotfixes.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"release-schedule","dir":"Articles","previous_headings":"","what":"Release Schedule","title":"Release Strategy","text":"release schedule maintained homepage.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"planning-releases","dir":"Articles","previous_headings":"","what":"Planning Releases","title":"Release Strategy","text":"past, whenever started looking towards future release, create new release issue label GitHub form release Q4-2022 prioritize issues. However, backlog minimal every issue considered Priority Issue. issue Priority, sent back Discussion Tab formed Priority issue. share advance users high level summary expected package updates via community meetings, especially anticipated breaking changes.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"package-release-process","dir":"Articles","previous_headings":"","what":"Package Release Process","title":"Release Strategy","text":"following important steps planned release hot fix release described. Depending package may helpful use usethis::use_release_issue() package-specific release_bullets() function.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"planned-release","dir":"Articles","previous_headings":"Package Release Process","what":"Planned Release","title":"Release Strategy","text":"package release done following steps: Create release version: Create new feature branch main. Call usethis::use_version() update Versions: field DESCRIPTION file update NEWS.md (replace “(development version)” version released) Create PR main merge . title PR must contain “[skip vbump]”. Otherwise, vbump workflow sets version development version CRAN reject submission. Bundle main (devtools::build(manual = TRUE)) send CRAN. See chapter R Packages details. CRAN asks modifications, repeat steps 1-2 necessary. package accepted available CRAN, use release button GitHub “release” package onto GitHub, select main branch target, use tag form vX.Y.Z, e.g., v1.1.2 (see past admiral releases reference Releasing Github section details). releases onto Github archives version code within main branch, attaches News/Changelog file, bundles code tar.gz file makes validation report via GitHub action validation insightsengineering/validatoR. also builds website released version stores new vx.y.z folder gh-pages branch. Merge main patch prepared case needed hotfix. Create next development version: Create new feature branch main. Call usethis::use_dev_version() update NEWS.md (adds new section # admiral (development version)) update version DESCRIPTION file development version. Create PR main merge .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"hot-fix-release","dir":"Articles","previous_headings":"Package Release Process","what":"Hot Fix Release","title":"Release Strategy","text":"Rarely, may need release hot fix immediately address bug. majority cases, -cycle release can made directly main branch, bug fixes new features released earlier planned, thus avoiding patch branch release. hot fix release done following steps: Identify bugs need fixed hot fix release label “hotfix” label. Branches addressing bugs Pull Requests merged single patch branch main branch, patch branch created recent release package. , run following git commands: git checkout -b patch vX.Y.Z git push -u origin patch need use development versions. .e., first pull request set version DESCRIPTION version released corresponding heading added NEWS.md. naming branch follow naming conventions guide. PRs hot fix merged (patch), bundle patch (devtools::build(manual = TRUE)) send CRAN. See chapter R Packages details. CRAN asks modifications, repeat steps 1-4 necessary. package accepted available CRAN, , use release button GitHub “release” package onto GitHub, select patch branch target, use tag form vX.Y.Z, e.g., v1.1.2 (see past admiral releases reference Releasing Github section details). releases onto Github archives version code within patch branch, attaches News/Changelog file, bundles code tar.gz file makes validation report via GitHub action validation insightsengineering/validatoR. also builds website released version stores new vx.y.z folder gh-pages branch. hot fixes merged main branch additional Pull Request. Merging PR update version DESCRIPTION file development version. Create next development version: Create new feature branch main. Update NEWS.md (add new section # admiral (development version)) Create PR main merge .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"releasing-to-github","dir":"Articles","previous_headings":"","what":"Releasing to Github","title":"Release Strategy","text":"Releases section main repo, select Draft New Release. Proceed creating appropriate release tag header, denoted vX.X.X admiral X.X.X respectively, release: Copy contents NEWS.md section release, paste release notes section: upload box says, “Attach binaries dropping selecting ” upload appropriate admiral_X.X.X.tar.gz file available download CRAN website. Click Publish Release ’re done! NB: Occasionally, might need delete tag something done error. Deleting tag can done GitHub must done terminal. However, easy!! Just use: git push --delete origin tagname","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"release-tracking","dir":"Articles","previous_headings":"","what":"Release Tracking","title":"Release Strategy","text":"new package release submitted CRAN awaiting go-live, can track status searching within dashboard.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"communications","dir":"Articles","previous_headings":"","what":"Communications","title":"Release Strategy","text":"release, raise awareness via Slack channel LinkedIn.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"unit-tests-become-a-safety-net-for-developers","dir":"Articles","previous_headings":"Why Write Unit Tests?","what":"Unit Tests Become a Safety Net for Developers","title":"Unit Test Guidance","text":"comprehensive suite unit tests can act safety net developers. frequently running tests, can assure recent modifications code haven’t broken anything. words, unit tests help prevent regressions.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"unit-tests-can-contribute-to-higher-code-quality","dir":"Articles","previous_headings":"Why Write Unit Tests?","what":"Unit Tests Can Contribute to Higher Code Quality","title":"Unit Test Guidance","text":"Since unit tests act safety net, developers become confident changing code. can refactor code without fear breaking things, driving general quality code base .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"unit-tests-can-contribute-to-better-application-architecture","dir":"Articles","previous_headings":"Why Write Unit Tests?","what":"Unit Tests Can Contribute to Better Application Architecture","title":"Unit Test Guidance","text":"can add unit tests easily code base, ’s usually good sign regarding quality app’s architecture. , drive write testable code can incentive better architecture.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"detects-code-smells-in-your-codebase","dir":"Articles","previous_headings":"Why Write Unit Tests?","what":"Detects Code Smells in your Codebase","title":"Unit Test Guidance","text":"ease adding unit tests code base good sign, opposite also true. hard time creating unit tests given piece code might sign code smells code—e.g. functions complex.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"tests-should-be-fast","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Tests Should Be Fast","title":"Unit Test Guidance","text":"’re slow, developers won’t run often . defeats whole purpose suite unit tests first place, boost developers’ confidence make changes code. tests can’t work safety net ’re run often.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"tests-should-be-simple","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Tests Should Be Simple","title":"Unit Test Guidance","text":"several techniques can apply high degree confidence correctness tests. One keep tests low cyclomatic complexity. Cyclomatic complexity code metric indicates number possible execution paths given method can follow. piece code lower complexity easier understand maintain, means developers less likely introduce bugs working . can measure cyclomatic complexity tests (using, instance, linter tool) best keep low.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"test-shouldnt-duplicate-implementation-logic","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Test Shouldn’t Duplicate Implementation Logic","title":"Unit Test Guidance","text":"person wrote test implementation, ’s possible made errors places. Since tests mirror implementation, might still pass, implementation wrong, tests might fool thinking otherwise. Resist urge make tests fancy, keep simple, testing suite better .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"tests-should-be-readable","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Tests Should Be Readable","title":"Unit Test Guidance","text":"best practice overlaps little bit one keeping tests simple. tests hard read, developers likely misunderstand introduce bugs. Test cases used form documentation, obviously need readable.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"running-unit-tests-part-of-the-build-process","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Running Unit Tests Part of the Build Process","title":"Unit Test Guidance","text":"Automate whole process running unit tests taking action fail. build process execute unit tests mark build broken tests fail.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"plan-your-unit-tests","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Plan your Unit Tests","title":"Unit Test Guidance","text":"Start considering derivation rule testing possible arguments/flexibilities function code. plan scenarios test. can either involve generating different input test cases feeding different calls function.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"test-coverage","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Test coverage","title":"Unit Test Guidance","text":"Unit tests cover functionality function. another function g() called within function f(), unit tests f() test functionality g(). tested unit tests g(), .e. unit tests added lowest level.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"tests-should-be-robust-to-cover-realistic-data-scenarios","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Tests Should be Robust to Cover Realistic Data Scenarios","title":"Unit Test Guidance","text":"generating input test cases, can helpful consider regular cases (expected common data scenarios), boundary cases (data points close equal), special cases (uncommon valid data scenarios, e.g. missing special characters). Although never cover every single eventuality possible input data (reliability testing method ever gives 100% certainty), need give confidence code robust enough work across data scenarios.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"testing-should-cover-possible-arguments","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Testing Should Cover Possible Arguments","title":"Unit Test Guidance","text":"different calls function, consider user might apply function test variety possible calls, whilst still remembering tips tests fast simple. needed cases complexity level flexibility function justifies , e.g. see test script: https://github.com/pharmaverse/admiral/blob/main/tests/testthat/test-derive_var_extreme_flag.R.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"exported-functions","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Exported Functions","title":"Unit Test Guidance","text":"Don’t forget add unit test exported function.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"snapshot-testing","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Snapshot Testing","title":"Unit Test Guidance","text":"Standard unit tests always convenient record expected behavior code. challenges include: Output large, making painful define reference output, bloating size test file making hard navigate. Text output includes many characters like quotes newlines require special handling string. Binary formats like plots images, difficult describe code: .e. plot looks right, error message useful human, print method uses color effectively. situations, testthat provides alternative mechanism: snapshot tests. Snapshot tests record results separate human readable file records results, including output, messages, warnings, errors. Review {testthat} snapshot vignette details.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"set-up-the-test-script","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Set up the Test Script","title":"Unit Test Guidance","text":"Within tests/testthat folder project, add script naming convention test-.R., unit test script can created console also, follows: testing framework used testthat following format : example, testing function called my_new_func contained script all_funcs.R console use: Open newly created file test-all_funcs.R use following format: Note: comparing datasets admiral use function expect_dfs_equal(). input expected output unit tests must follow following rules: Input output simple possible. Values hard-coded whenever possible. values need derived, unit tested functions can used. contrast Programming Strategy documentation function examples, test files include library(pkg_name) calls. dataset needs created testing purposes, done using function tribble() tibble package following command dplyr::tribble(). Furthermore, functions need called, also done using pkg_name::fun()notation. Make sure align columns well. ensures quick code readability. Ensure give meaningful explanation test testthat call, compiled package validation report. name function test ID included title also help traceability. comments ending ---- create entries TOC RStudio.","code":"usethis::use_test(\"\") ## Test 1: ---- test_that(\" Test 1: \", { input <- dplyr::tribble( ~inputvar1, ~inputvar2, ... ... ) expected_output <- mutate(input, outputvar = c()) expect_dfs_equal((input), expected_output) }) usethis::use_test(\"all_funcs\") # my_new_func ---- ## Test 1: ---- test_that(\"my_new_func Test 1: \", { input <- dplyr::tribble( ~inputvar1, ~inputvar2, ... ... ) expected_output <- mutate(input, outputvar = c()) expect_dfs_equal((input), expected_output) })"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"addin-admiraldevformat_test_that_file","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Addin admiraldev::format_test_that_file()","title":"Unit Test Guidance","text":"ease burden developers writing adding tests developed Addin formatting test_that test files according admiral programming standards. Addin add update comments well number re-numbers tests. Just use Addin button select “Format test_that test file” seen image. sure test-file open selected calling Addin. Addin perform following: Updates adds number tests comments test_that() call Updates comments based description provided test_that() call Updates function name test_that() call. function name extracted last # ---- comment test_that() call. test file tests one function, comments added first test function. test files tests single function , comments can omitted. case addin determines function name file name stripping “test-” prefix “.R” suffix. writing new unit tests, just provide description test_that() call necessary function name # ---- comment: Call addin get: tested unit test program, can run unit tests console, follows. running just tests current file call","code":"# arg_name ---- test_that(\"arg_name works\", { expect_equal(arg_name(sym(\"a\")), \"a\") expect_equal(arg_name(call(\"enquo\", sym(\"a\"))), \"a\") expect_error(arg_name(\"a\"), \"Could not extract argument name from\") }) # convert_dtm_to_dtc ---- test_that(\"works if dtm is in correct format\", { expect_equal( convert_dtm_to_dtc(as.POSIXct(\"2022-04-05 15:34:07 UTC\")), \"2022-04-05T15:34:07\" ) }) test_that(\"Error is thrown if dtm is not in correct format\", { expect_error( convert_dtm_to_dtc(\"2022-04-05T15:26:14\"), \"lubridate::is.instant(dtm) is not TRUE\", fixed = TRUE ) }) # arg_name ---- ## Test 1: arg_name works ---- test_that(\"arg_name Test 1: arg_name works\", { expect_equal(arg_name(sym(\"a\")), \"a\") expect_equal(arg_name(call(\"enquo\", sym(\"a\"))), \"a\") expect_error(arg_name(\"a\"), \"Could not extract argument name from\") }) # convert_dtm_to_dtc ---- ## Test 2: works if dtm is in correct format ---- test_that(\"convert_dtm_to_dtc Test 2: works if dtm is in correct format\", { expect_equal( convert_dtm_to_dtc(as.POSIXct(\"2022-04-05 15:34:07 UTC\")), \"2022-04-05T15:34:07\" ) }) ## Test 3: Error is thrown if dtm is not in correct format ---- test_that(\"convert_dtm_to_dtc Test 3: Error is thrown if dtm is not in correct format\", { expect_error( convert_dtm_to_dtc(\"2022-04-05T15:26:14\"), \"lubridate::is.instant(dtm) is not TRUE\", fixed = TRUE ) }) devtools::test() devtools::test_file()"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"automation-of-unit-tests","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Automation of Unit Tests","title":"Unit Test Guidance","text":"user actions pull request {admiral} GitHub repo, unit tests automatically run pull request denied unit tests fail.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Writing Vignettes","text":"guidance ensures consistency across vignettes admiral package terms content, structure code execution. general rule, vignette workflow defined r-pkgs.org followed.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"metadata","dir":"Articles","previous_headings":"","what":"Metadata","title":"Writing Vignettes","text":"vignette admiral start following metadata. vignette meaningful.","code":"--- title: \"\" output: rmarkdown::html_vignette: vignette: > %\\VignetteIndexEntry{} %\\VignetteEngine{knitr::rmarkdown} ---"},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"default-options","dir":"Articles","previous_headings":"Markdown","what":"Default Options","title":"Writing Vignettes","text":"chunks used within vignette, following options set metadata ensure chunks rendered consistently across vignettes.","code":"```{r setup, include=FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = \"#>\" ) ```"},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"table-of-contents","dir":"Articles","previous_headings":"Markdown > Format Sections","what":"Table of Contents","title":"Writing Vignettes","text":"Headings must title case start Heading 1: first section gives brief introduction vignette. last sub-section introduction describe packages required run admiral functions. admiral package described first. warning=FALSE message=FALSE options prevent usual messages: Attaching package: ‘xxxx’following objects masked ‘package:yyyyy’ fun1, fun2","code":"# Heading 1 This is the description of my first section. ## Heading 1.1 This is the description of my first sub-section within my first section. ## Heading 1.2 This is the description of my second sub-section within my first section. # Introduction This is the introduction of my vignette. ## Required Packages ```{r, warning=FALSE, message=FALSE} library(admiral) # ```"},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"general-conventions","dir":"Articles","previous_headings":"Markdown > Format Sections > Conventions","what":"General Conventions","title":"Writing Vignettes","text":"new vignette must added _pkgdown.yml file relevant section. variable name, dataset name, function, argument name must quoted backticks: e.g. Functions must also end (). Variables datasets name expected uppercase. codes must described, executed output result displayed code executed. Use: output created must clearly show function derived. least show variables/records used input function derived variables/records. dataset must displayed, formatted using dataset_vignette() function displayed consistently across vignettes.E.g. Description execution code used derive variable/record Output dataset formatted using dataset_vignette()… Note: call get formatted dataset : Displaying many big datasets vignette, may require long time load page may cause messages browser page responsive. case number displayed observations restricted either restricting source datasets beginning vignette call dataset_vignette() calls affected.","code":"The `date` parameter of the `derive_my_var()` function expects a date variable, e.g., `ADT`. ```{r} # ``` vs1 <- vs %>% derive_vars_dt( new_vars_prefix = \"A\", dtc = VSDTC, date_imputation = \"first\" ) ```r dataset_vignette( vs1, display_vars = exprs(USUBJID, VSTESTCD, VISIT, VSDTC, ADT), filter = VSTESTCD == \"WEIGHT\" ) ```"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"using-footnotes","dir":"Articles","previous_headings":"Markdown > Format Sections > Conventions","what":"Using Footnotes","title":"Writing Vignettes","text":"Footnotes can useful add context without adding clutter primary subject matter vignette written. use footnotes, add caret identifier inside brackets e.g. ([^1]). identifiers can numbers words, can’t contain spaces tabs. following markdown text render follows: example 1","code":"Here is an example [^1] [^1]: Cool note about the example."},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"conventions-for-adam-workflow","dir":"Articles","previous_headings":"Markdown > Format Sections > Conventions","what":"Conventions for ADaM Workflow","title":"Writing Vignettes","text":"vignettes describing ADaM workflow, second section summarize programming workflow. first sub-section within workflow always describe data read demonstrate use admiral functions, sub-section within programming workflow tagged (e.g. [Step1] (#step)), user can go relevant section programming workflow (addition Table contents). Don’t use tag number use meaningful name (e.g. use (#link1), use (#this_action)) last section link template script. ADSL variables ADSL variables required derivation merged SDTM dataset first derivation. ADSL variables added -variables derivations add observations. ensures ADSL variables populated new observations. adsl_vars variable created beginning script added by_vars parameter derivations add observations. ADSL variables final dataset required derivation merged dataset last derivation.","code":"# Programming Workflow * [Read in Data](#readdata) * [Derive/Impute End and Start Analysis Date/time and Relative Day](#datetime) * ... * [Assign `ASEQ`](#aseq) ## Read in Data {#readdata} ## Derive/Impute End and Start Analysis Date/time and Relative Day {#datetime} ## ... ## Assign `ASEQ` {#aseq} # Another Section # Example Script ADaM | Sample Code ---- | -------------- ADxx | [ad_adxx.R](https://github.com/pharmaverse/admiral/blob/main/inst/templates/ad_adxx.R){target=\"_blank\"}"},{"path":"https://pharmaverse.github.io/admiraldev/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"define authors actively maintaining code base, contributors made significant contribution past. Ben Straub. Author, maintainer. Stefan Bundfuss. Author. Jeffrey Dickinson. Author. Ross Farrugia. Author. Pooja Kumari. Author. Edoardo Mancini. Author. Sadchla Mascary. Author. Zelos Zhu. Author. Ania Golab. Contributor. Samia Kabi. Contributor. Syed Mubasheer. Contributor. Thomas Neitmann. Contributor. Ondrej Slama. Contributor. F. Hoffmann-La Roche AG. Copyright holder, funder. GlaxoSmithKline LLC. Copyright holder, funder.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Straub B, Bundfuss S, Dickinson J, Farrugia R, Kumari P, Mancini E, Mascary S, Zhu Z (2024). admiraldev: Utility Functions Development Tools Admiral Package Family. R package version 1.0.0.9025, https://github.com/pharmaverse/admiraldev/, https://pharmaverse.github.io/admiraldev/.","code":"@Manual{, title = {admiraldev: Utility Functions and Development Tools for the Admiral Package Family}, author = {Ben Straub and Stefan Bundfuss and Jeffrey Dickinson and Ross Farrugia and Pooja Kumari and Edoardo Mancini and Sadchla Mascary and Zelos Zhu}, year = {2024}, note = {R package version 1.0.0.9025, https://github.com/pharmaverse/admiraldev/}, url = {https://pharmaverse.github.io/admiraldev/}, }"},{"path":"https://pharmaverse.github.io/admiraldev/dev/index.html","id":"admiraldev-","dir":"","previous_headings":"","what":"Utility Functions and Development Tools for the Admiral Package Family","title":"Utility Functions and Development Tools for the Admiral Package Family","text":"Utility Functions Development Tools Admiral Package Family","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/index.html","id":"purpose","dir":"","previous_headings":"","what":"Purpose","title":"Utility Functions and Development Tools for the Admiral Package Family","text":"Functions, tools documentation developing core admiral extension package functions. functions admiraldev around testing inputs going functions. also additional quality life functions/Addins assist developers admiral admiral extension packages, functions help rendering documentation, Developer Guides developing function using GitHub, GitHub Actions. NOTE: package intended standalone use rather central dependency admiral extension packages","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Utility Functions and Development Tools for the Admiral Package Family","text":"package available CRAN can installed running install.packages(\"admiraldev\"). install latest development version package directly GitHub use following code:","code":"if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_github(\"pharmaverse/admiraldev\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/index.html","id":"release-schedule","dir":"","previous_headings":"","what":"Release Schedule","title":"Utility Functions and Development Tools for the Admiral Package Family","text":"admiraldev released CRAN time official release admiral. can find release schedule admiral packages .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"Add suffix variables list expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"","code":"add_suffix_to_vars(order, vars, suffix)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"order List expressions Permitted Values: list variables desc() function calls created exprs(), e.g., exprs(ADT, desc(AVAL)) vars Variables change Permitted Values: list variables created exprs() suffix Suffix Permitted Values: character scalar","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"list expression element suffix (suffix) added every symbol specified vars","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) add_suffix_to_vars(exprs(ADT, desc(AVAL), AVALC), vars = exprs(AVAL), suffix = \".join\") #> [[1]] #> ADT #> #> [[2]] #> desc(AVAL.join) #> #> [[3]] #> AVALC #>"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/admiraldev-package.html","id":null,"dir":"Reference","previous_headings":"","what":"admiraldev: Utility Functions and Development Tools for the Admiral Package Family — admiraldev-package","title":"admiraldev: Utility Functions and Development Tools for the Admiral Package Family — admiraldev-package","text":"Utility functions check data, variables conditions functions used 'admiral' 'admiral' extension packages. Additional utility helper functions assist developers maintaining documentation, testing general upkeep 'admiral' 'admiral' extension packages.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/admiraldev-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"admiraldev: Utility Functions and Development Tools for the Admiral Package Family — admiraldev-package","text":"Maintainer: Ben Straub ben.x.straub@gsk.com Authors: Stefan Bundfuss Jeffrey Dickinson Ross Farrugia Pooja Kumari Edoardo Mancini Sadchla Mascary Zelos Zhu contributors: Ania Golab [contributor] Samia Kabi [contributor] Syed Mubasheer [contributor] Thomas Neitmann [contributor] Ondrej Slama [contributor] F. Hoffmann-La Roche AG [copyright holder, funder] GlaxoSmithKline LLC [copyright holder, funder]","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/arg_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Argument Name from an Expression — arg_name","title":"Extract Argument Name from an Expression — arg_name","text":"Extract Argument Name Expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/arg_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Argument Name from an Expression — arg_name","text":"","code":"arg_name(expr)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/arg_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Argument Name from an Expression — arg_name","text":"expr expression created inside function using substitute()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/arg_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Argument Name from an Expression — arg_name","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument an Atomic Vector? — assert_atomic_vector","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"Checks argument atomic vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"","code":"assert_atomic_vector( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_atomic_vector\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"function throws error arg atomic vector. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"","code":"example_fun <- function(x) { assert_atomic_vector(x) } example_fun(1:10) try(example_fun(list(1, 2))) #> Error in example_fun(list(1, 2)) : #> Argument `x` must be an atomic vector, but is a list."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Character Scalar (String)? — assert_character_scalar","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"Checks argument character scalar (optionally) whether matches one provided values.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"","code":"assert_character_scalar( arg, values = NULL, case_sensitive = TRUE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_character_scalar\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"arg function argument checked values character vector valid values arg. Values converted lower case vector case_sensitive = FALSE used. case_sensitive argument handled case-sensitive? set FALSE, argument converted lower case checking permitted values returning argument. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"function throws error arg character vector arg character vector length > 1 value one values specified. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"","code":"example_fun <- function(msg_type) { assert_character_scalar(msg_type, values = c(\"warning\", \"error\")) } example_fun(\"warning\") try(example_fun(\"message\")) #> Error in example_fun(\"message\") : #> Argument `msg_type` must be equal to one of \"warning\" or \"error\". try(example_fun(TRUE)) #> Error in example_fun(TRUE) : #> Argument `msg_type` must be a scalar of class , but is #> `TRUE`. # handling arguments case-insensitive example_fun2 <- function(msg_type) { msg_type <- assert_character_scalar( msg_type, values = c(\"warning\", \"error\"), case_sensitive = FALSE ) if (msg_type == \"warning\") { print(\"A warning was requested.\") } } example_fun2(\"Warning\") #> [1] \"A warning was requested.\""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Character Vector? — assert_character_vector","title":"Is an Argument a Character Vector? — assert_character_vector","text":"Checks argument character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Character Vector? — assert_character_vector","text":"","code":"assert_character_vector( arg, values = NULL, named = FALSE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_character_vector\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Character Vector? — assert_character_vector","text":"arg function argument checked values character vector valid values arg named set TRUE, error issued elements vector named. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Character Vector? — assert_character_vector","text":"function throws error arg character vector element included list valid values. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Character Vector? — assert_character_vector","text":"","code":"example_fun <- function(chr) { assert_character_vector(chr) } example_fun(letters) try(example_fun(1:10)) #> Error in example_fun(1:10) : #> Argument `chr` must be , but is an integer vector. example_fun2 <- function(chr) { assert_character_vector(chr, named = TRUE) } try(example_fun2(c(alpha = \"a\", \"b\", gamma = \"c\"))) #> Error in example_fun2(c(alpha = \"a\", \"b\", gamma = \"c\")) : #> All elements of `chr` argument must be named. #> ℹ The indices of the unnamed elements are 2"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Data Frame? — assert_data_frame","title":"Is an Argument a Data Frame? — assert_data_frame","text":"Checks argument data frame (optionally) whether contains set required variables","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Data Frame? — assert_data_frame","text":"","code":"assert_data_frame( arg, required_vars = NULL, check_is_grouped = TRUE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_data_frame\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Data Frame? — assert_data_frame","text":"arg function argument checked required_vars list variables created using exprs() check_is_grouped Throw error dataset grouped? Defaults TRUE. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Data Frame? — assert_data_frame","text":"function throws error arg data frame arg data frame misses variable specified required_vars. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Data Frame? — assert_data_frame","text":"","code":"library(dplyr) library(rlang) dm <- tribble( ~STUDYID, ~USUBJID, \"XYZ\", \"1\", \"XYZ\", \"2\" ) example_fun <- function(dataset) { assert_data_frame(dataset, required_vars = exprs(STUDYID, USUBJID)) } example_fun(dm) try(example_fun(select(dm, -STUDYID))) #> Error in example_fun(select(dm, -STUDYID)) : #> Required variable `STUDYID` is missing in `dataset` try(example_fun(\"Not a dataset\")) #> Error in example_fun(\"Not a dataset\") : #> Argument `dataset` must be class , but is a string. try(example_fun(group_by(dm, USUBJID))) #> Error in example_fun(group_by(dm, USUBJID)) : #> Argument `dataset` must not be a grouped dataset, please `ungroup()` it."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"Checks variable dataset date datetime variable","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"","code":"assert_date_var( dataset, var, dataset_name = rlang::caller_arg(dataset), var_name = rlang::caller_arg(var), message = NULL, class = \"assert_date_var\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"dataset dataset variable expected var variable check dataset_name name dataset. argument specified, specified name displayed error message. var_name name variable. argument specified, specified name displayed error message. message (string) string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"var_name\" \"dataset_name\", can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"function throws error var date datetime variable dataset returns input invisibly otherwise.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"","code":"library(lubridate) #> #> Attaching package: ‘lubridate’ #> The following objects are masked from ‘package:base’: #> #> date, intersect, setdiff, union library(dplyr) library(rlang) example_fun <- function(dataset, var) { var <- assert_symbol(enexpr(var)) assert_date_var(dataset = dataset, var = !!var) } my_data <- tribble( ~USUBJID, ~ADT, \"1\", ymd(\"2020-12-06\"), \"2\", ymd(\"\") ) example_fun( dataset = my_data, var = ADT ) try(example_fun( dataset = my_data, var = USUBJID )) #> Error in example_fun(dataset = my_data, var = USUBJID) : #> Column \"USUBJID\" in dataset `dataset` must be a date or datetime, but is #> a character vector. example_fun2 <- function(dataset, var) { var <- assert_symbol(enexpr(var)) assert_date_var( dataset = dataset, var = !!var, dataset_name = \"your_data\", var_name = \"your_var\" ) } try(example_fun2( dataset = my_data, var = USUBJID )) #> Error in example_fun2(dataset = my_data, var = USUBJID) : #> Column \"your_var\" in dataset `your_data` must be a date or datetime, but #> is a character vector."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an object a date or datetime vector? — assert_date_vector","title":"Is an object a date or datetime vector? — assert_date_vector","text":"Check object/vector date datetime variable without needing dataset input","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an object a date or datetime vector? — assert_date_vector","text":"","code":"assert_date_vector( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_date_vector\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an object a date or datetime vector? — assert_date_vector","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL function assert_date_vector exits early throw error. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an object a date or datetime vector? — assert_date_vector","text":"function returns error arg missing, date datetime variable otherwise returns invisible output.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an object a date or datetime vector? — assert_date_vector","text":"","code":"example_fun <- function(arg) { assert_date_vector(arg) } example_fun( as.Date(\"2022-01-30\", tz = \"UTC\") ) try(example_fun(\"1993-07-14\")) #> Error in example_fun(\"1993-07-14\") : #> Argument `arg` must be a date or datetime, but is a string."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert Argument is an Expression — assert_expr","title":"Assert Argument is an Expression — assert_expr","text":"Assert Argument Expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert Argument is an Expression — assert_expr","text":"","code":"assert_expr( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_expr\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert Argument is an Expression — assert_expr","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assert Argument is an Expression — assert_expr","text":"function throws error arg expression, .e. either symbol call, returns input invisibly otherwise","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a List of Expressions? — assert_expr_list","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"Checks argument list expressions.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"","code":"assert_expr_list( arg, required_elements = NULL, named = FALSE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_expr_list\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"arg function argument checked required_elements character vector names must present arg named set TRUE, error issued elements list named. optional checked argument optional? set FALSE arg NULL error thrown. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"function throws error arg list expressions. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"","code":"library(rlang) example_fun <- function(vars) { assert_expr_list(vars) } example_fun(exprs(DTHDOM = \"AE\", DTHSEQ = AESEQ)) try(example_fun(exprs(\"AE\", DTSEQ = AESEQ, !!list(\"a\"), !!list(\"a\")))) #> Error in example_fun(exprs(\"AE\", DTSEQ = AESEQ, !!list(\"a\"), !!list(\"a\"))) : #> All elements of `vars` must be an expression. #> ℹ `vars[[3]]` = `list(\"a\")` is of type , and `vars[[4]]` = `list(\"a\")` is #> of type "},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Filter Condition? — assert_filter_cond","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"Argument Filter Condition?","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"","code":"assert_filter_cond( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_filter_cond\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"arg Quosure - filtering condition. optional Logical - argument optional? Defaults FALSE. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"Performs necessary checks returns arg pass. Otherwise throws informative error.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"Check arg suitable filtering condition used functions like subset dplyr::filter.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) dm <- dplyr::tribble( ~DOMAIN, ~STUDYID, ~USUBJID, ~AGE, \"DM\", \"STUDY X\", \"01-701-1015\", 64, \"DM\", \"STUDY X\", \"01-701-1016\", 65, ) # typical usage in a function as an argument check example_fun <- function(dat, x) { x <- assert_filter_cond(enexpr(x), arg_name = \"x\") filter(dat, !!x) } example_fun(dm, AGE == 64) #> # A tibble: 1 × 4 #> DOMAIN STUDYID USUBJID AGE #> #> 1 DM STUDY X 01-701-1015 64 try(assert_filter_cond(mtcars)) #> Error in eval(expr, envir, enclos) : #> Argument `mtcars` must be a filter condition, but is a data frame"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Is Argument a Function? — assert_function","title":"Is Argument a Function? — assert_function","text":"Checks argument function expected arguments provided function.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is Argument a Function? — assert_function","text":"","code":"assert_function( arg, params = NULL, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_function\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is Argument a Function? — assert_function","text":"arg function function checked params character vector character vector expected argument names aforementioned function arg. ellipsis, ..., included function formals function arg, argument, params ignored, accepting values character vector. optional checked argument optional? set FALSE arg NULL error thrown. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is Argument a Function? — assert_function","text":"function throws error argument function function provide arguments specified params argument (assuming ellipsis function formals)","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is Argument a Function? — assert_function","text":"","code":"example_fun <- function(fun) { assert_function(fun, params = c(\"x\")) } example_fun(mean) try(example_fun(1)) #> Error in example_fun(1) : #> Argument `fun` must be a function, but is a number. try(example_fun(sum)) #> Error in example_fun(sum) : #> \"x\" is not an argument of the function specified for `fun`."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function_param.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert Argument is a Parameter of a Function — assert_function_param","title":"Assert Argument is a Parameter of a Function — assert_function_param","text":"function deprecated, please use assert_function() instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function_param.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert Argument is a Parameter of a Function — assert_function_param","text":"","code":"assert_function_param(arg, params)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function_param.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert Argument is a Parameter of a Function — assert_function_param","text":"arg name function passed string params character vector function parameters","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function_param.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assert Argument is a Parameter of a Function — assert_function_param","text":"function throws error elements params argument function given arg","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Does a Dataset Contain All Required Variables? — assert_has_variables","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"function deprecated, please use assert_data_frame() instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"","code":"assert_has_variables(dataset, required_vars)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"dataset data.frame required_vars character vector variable names","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"function throws error required variables missing input dataset. Otherwise, dataset returned invisibly.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"Checks dataset contains required variables","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument an Integer Scalar? — assert_integer_scalar","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"Checks argument integer scalar","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"","code":"assert_integer_scalar( arg, subset = \"none\", optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_integer_scalar\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"arg function argument checked subset subset integers arg part . one \"none\" (default), \"positive\", \"non-negative\" \"negative\". optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"function throws error arg integer belonging specified subset. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"","code":"example_fun <- function(num1, num2) { assert_integer_scalar(num1, subset = \"positive\") assert_integer_scalar(num2, subset = \"negative\") } example_fun(1, -9) try(example_fun(1.5, -9)) #> Error in example_fun(1.5, -9) : #> Argument `num1` must be a positive integer scalar. try(example_fun(2, 0)) #> Error in example_fun(2, 0) : #> Argument `num2` must be a negative integer scalar. try(example_fun(\"2\", 0)) #> Error in example_fun(\"2\", 0) : #> Argument `num1` must be a positive integer scalar."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_element.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","title":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","text":"Checks elements list named lists/classes fulfill certain condition. , error issued elements list fulfilling condition listed.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","text":"","code":"assert_list_element( list, element, condition, message_text, arg_name = rlang::caller_arg(list), message = NULL, class = \"assert_list_element\", call = parent.frame(), ... )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","text":"list list checked list named lists classes expected. element name element lists/classes character scalar expected. condition Condition fulfilled condition evaluated element list. element lists/classes can referred name, e.g., censor == 0 check censor field class. message_text Text displayed error message listing values meet condition. text describe condition fulfilled, e.g., \"Error {arg_name}: censor values must zero.\". message argument specified, text displayed message_text ignored. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages. ... Objects required evaluate condition condition contains objects apart element, passed function. See second example .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_element.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","text":"error condition met. input otherwise.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"Checks argument list objects inheriting S3 class type specified.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"","code":"assert_list_of( arg, cls, named = FALSE, optional = TRUE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_list_of\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"arg function argument checked cls S3 class type check named set TRUE, error issued elements list named. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"function throws error arg list arg list elements objects inheriting class type class. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"","code":"example_fun <- function(list) { assert_list_of(list, \"data.frame\") } example_fun(list(mtcars, iris)) try(example_fun(list(letters, 1:10))) #> Error in example_fun(list(letters, 1:10)) : #> Each element of the list in argument `list` must be class/type #> . #> ℹ But, element 1 is a character vector, and element 2 is an integer vector try(example_fun(c(TRUE, FALSE))) #> Error in example_fun(c(TRUE, FALSE)) : #> Argument `list` must be class , but is a logical vector. example_fun2 <- function(list) { assert_list_of(list, \"numeric\", named = TRUE) } try(example_fun2(list(1, 2, 3, d = 4))) #> Error in example_fun2(list(1, 2, 3, d = 4)) : #> All elements of `list` argument must be named. #> ℹ The indices of the unnamed elements are 1, 2, and 3"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"Checks argument logical scalar","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"","code":"assert_logical_scalar( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_logical_scalar\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown. Otherwise, NULL considered valid value. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"function throws error arg neither TRUE FALSE. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"","code":"example_fun <- function(flag) { assert_logical_scalar(flag) } example_fun(FALSE) try(example_fun(NA)) #> Error in example_fun(NA) : #> Argument `flag` must be either TRUE or FALSE, but is `NA`. try(example_fun(c(TRUE, FALSE, FALSE))) #> Error in example_fun(c(TRUE, FALSE, FALSE)) : #> Argument `flag` must be either TRUE or FALSE, but is a logical vector. try(example_fun(1:10)) #> Error in example_fun(1:10) : #> Argument `flag` must be either TRUE or FALSE, but is an integer vector."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert Argument is a Named List or Vector — assert_named","title":"Assert Argument is a Named List or Vector — assert_named","text":"Assert elements argument named.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert Argument is a Named List or Vector — assert_named","text":"","code":"assert_named( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_named\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert Argument is a Named List or Vector — assert_named","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assert Argument is a Named List or Vector — assert_named","text":"function throws error arg named list vector returns input invisibly otherwise","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assert Argument is a Named List or Vector — assert_named","text":"","code":"example_fun <- function(varval_list) { assert_named(varval_list) } example_fun(list(var1 = 1, var2 = \"x\")) try(example_fun(list(1, \"x\"))) #> Error in example_fun(list(1, \"x\")) : #> All elements of `varval_list` argument must be named. #> ℹ The indices of the unnamed elements are 1 and 2 try(example_fun(list(var = 1, \"x\"))) #> Error in example_fun(list(var = 1, \"x\")) : #> All elements of `varval_list` argument must be named. #> ℹ The indices of the unnamed elements are 2"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named_exprs.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert Argument is a Named List of Expressions — assert_named_exprs","title":"Assert Argument is a Named List of Expressions — assert_named_exprs","text":"function deprecated, please use assert_expr_list() instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named_exprs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert Argument is a Named List of Expressions — assert_named_exprs","text":"","code":"assert_named_exprs(arg, optional = FALSE)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named_exprs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert Argument is a Named List of Expressions — assert_named_exprs","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named_exprs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assert Argument is a Named List of Expressions — assert_named_exprs","text":"function throws error arg named list expression returns input invisibly otherwise","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Numeric Vector? — assert_numeric_vector","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"Checks argument numeric vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"","code":"assert_numeric_vector( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_numeric_vector\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"function throws error arg numeric vector. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"","code":"example_fun <- function(num) { assert_numeric_vector(num) } example_fun(1:10) try(example_fun(letters)) #> Error in example_fun(letters) : #> Argument `num` must be a numeric vector, but it is a character vector."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":null,"dir":"Reference","previous_headings":"","what":"Is There a One to One Mapping between Variables? — assert_one_to_one","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"Checks one one mapping two lists variables.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"","code":"assert_one_to_one( dataset, vars1, vars2, dataset_name = rlang::caller_arg(dataset), message = NULL, class = \"assert_one_to_one\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"dataset Dataset checked variables specified vars1 vars2 expected. vars1 First list variables vars2 Second list variables dataset_name string indicating label/symbol object checked. Default rlang::caller_arg(dataset). message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"dataset_name\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"error condition meet. input otherwise.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"","code":"library(dplyr) library(rlang) df <- tribble( ~SPECIES, ~SPECIESN, \"DOG\", 1L, \"CAT\", 2L, \"DOG\", 1L ) assert_one_to_one(df, vars1 = exprs(SPECIES), vars2 = exprs(SPECIESN)) df_many <- tribble( ~SPECIES, ~SPECIESN, \"DOG\", 1L, \"CAT\", 2L, \"DOG\", 3L ) try( assert_one_to_one(df_many, vars1 = exprs(SPECIES), vars2 = exprs(SPECIESN)) ) #> Error in eval(expr, envir, enclos) : #> For some values of \"SPECIES\" there is more than one value of \"SPECIESN\" #> ℹ Call `admiral::get_one_to_many_dataset()` to get all one-to-many values. try( assert_one_to_one(df_many, vars1 = exprs(SPECIESN), vars2 = exprs(SPECIES)) ) #> Error in eval(expr, envir, enclos) : #> There is more than one value of \"SPECIESN\" for some values of \"SPECIES\" #> ℹ Call `admiral::get_many_to_one_dataset()` to get all many-to-one values."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":null,"dir":"Reference","previous_headings":"","what":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"Checks parameter (PARAMCD) exist dataset.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"","code":"assert_param_does_not_exist( dataset, param, arg_name = rlang::caller_arg(dataset), message = NULL, class = \"assert_param_does_not_exist\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"dataset data.frame param Parameter code check arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"function throws error parameter exists input dataset. Otherwise, dataset returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"","code":"library(dplyr) advs <- tribble( ~USUBJID, ~VSTESTCD, ~VSTRESN, ~VSSTRESU, ~PARAMCD, ~AVAL, \"P01\", \"WEIGHT\", 80.1, \"kg\", \"WEIGHT\", 80.1, \"P02\", \"WEIGHT\", 85.7, \"kg\", \"WEIGHT\", 85.7 ) assert_param_does_not_exist(advs, param = \"HR\") try(assert_param_does_not_exist(advs, param = \"WEIGHT\")) #> Error in eval(expr, envir, enclos) : #> The parameter code \"WEIGHT\" already exists in dataset `advs`."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"Checks argument object inheriting S3 class specified.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"","code":"assert_s3_class( arg, cls, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_s3_class\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"arg function argument checked cls S3 class check optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"function throws error arg object inherit class. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"","code":"example_fun <- function(obj) { assert_s3_class(obj, \"factor\") } example_fun(as.factor(letters)) try(example_fun(letters)) #> Error in example_fun(letters) : #> Argument `obj` must be class , but is a character vector. try(example_fun(1:10)) #> Error in example_fun(1:10) : #> Argument `obj` must be class , but is an integer vector."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":null,"dir":"Reference","previous_headings":"","what":"Are All Argument of the Same Type? — assert_same_type","title":"Are All Argument of the Same Type? — assert_same_type","text":"Checks arguments type.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are All Argument of the Same Type? — assert_same_type","text":"","code":"assert_same_type( ..., .message = c(\"Arguments {.arg {arg_names}} must be the same type.\", i = paste(\"Argument types are\", paste0(\"{.arg \", arg_names, \"} {.cls \", types, \"}\", collapse = \", \"))), .class = \"assert_same_type\", .call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are All Argument of the Same Type? — assert_same_type","text":"... Arguments checked .message character vector passed cli_abort(message) assertion fails. .class character vector passed cli_abort(class) assertion fails. .call environment passed cli_abort(call) assertion fails.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are All Argument of the Same Type? — assert_same_type","text":"function throws error arguments type.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are All Argument of the Same Type? — assert_same_type","text":"","code":"example_fun <- function(true_value, false_value, missing_value) { assert_same_type(true_value, false_value, missing_value) } example_fun( true_value = \"Y\", false_value = \"N\", missing_value = NA_character_ ) try(example_fun( true_value = 1, false_value = 0, missing_value = \"missing\" )) #> Error in example_fun(true_value = 1, false_value = 0, missing_value = \"missing\") : #> Arguments `true_value`, `false_value`, and `missing_value` must be the #> same type. #> ℹ Argument types are `true_value` , `false_value` , #> `missing_value` "},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Symbol? — assert_symbol","title":"Is an Argument a Symbol? — assert_symbol","text":"Checks argument symbol","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Symbol? — assert_symbol","text":"","code":"assert_symbol( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_symbol\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Symbol? — assert_symbol","text":"arg function argument checked. Must symbol. See examples. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Symbol? — assert_symbol","text":"function throws error arg symbol returns input invisibly otherwise.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Symbol? — assert_symbol","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) dm <- dplyr::tribble( ~DOMAIN, ~USUBJID, \"DM\", \"01-701-1015\", \"DM\", \"01-701-1016\", ) example_fun <- function(dat, var) { var <- assert_symbol(enexpr(var)) select(dat, !!var) } example_fun(dm, USUBJID) #> # A tibble: 2 × 1 #> USUBJID #> #> 1 01-701-1015 #> 2 01-701-1016 try(example_fun(dm)) #> Error in example_fun(dm) : #> Argument `enexpr(var)` must be a , but is missing. try(example_fun(dm, \"USUBJID\")) #> Error in example_fun(dm, \"USUBJID\") : #> Argument `enexpr(var)` must be a , but is a string. try(example_fun(dm, toupper(PARAMCD))) #> Error in example_fun(dm, toupper(PARAMCD)) : #> Argument `enexpr(var)` must be a , but is a call."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":null,"dir":"Reference","previous_headings":"","what":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"Checks parameter (PARAMCD) dataset provided expected unit.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"","code":"assert_unit( dataset, param, required_unit, get_unit_expr, arg_name = rlang::caller_arg(required_unit), message = NULL, class = \"assert_unit\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"dataset data.frame param Parameter code parameter check required_unit Expected unit get_unit_expr Expression used provide unit param arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"function throws error unit variable differs unit observation parameter input dataset. Otherwise, dataset returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"","code":"library(dplyr) advs <- tribble( ~USUBJID, ~VSTESTCD, ~VSTRESN, ~VSSTRESU, ~PARAMCD, ~AVAL, \"P01\", \"WEIGHT\", 80.1, \"kg\", \"WEIGHT\", 80.1, \"P02\", \"WEIGHT\", 85.7, \"kg\", \"WEIGHT\", 85.7 ) assert_unit(advs, param = \"WEIGHT\", required_unit = \"kg\", get_unit_expr = VSSTRESU)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a List of Variables? — assert_vars","title":"Is an Argument a List of Variables? — assert_vars","text":"Checks argument valid list symbols (e.g., created exprs())","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a List of Variables? — assert_vars","text":"","code":"assert_vars( arg, expect_names = FALSE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_vars\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a List of Variables? — assert_vars","text":"arg function argument checked expect_names argument set TRUE, checked variables named, e.g., exprs(APERSDT = APxxSDT, APEREDT = APxxEDT). optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a List of Variables? — assert_vars","text":"function throws error arg list symbols (e.g., created exprs() returns input invisibly otherwise.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a List of Variables? — assert_vars","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) example_fun <- function(by_vars) { assert_vars(by_vars) } example_fun(exprs(USUBJID, PARAMCD)) try(example_fun(quos(USUBJID, PARAMCD))) #> Error in example_fun(quos(USUBJID, PARAMCD)) : #> Each element of the list in argument `by_vars` must be class/type #> . #> ℹ But, element 1 is a object, and element 2 is a object try(example_fun(c(\"USUBJID\", \"PARAMCD\", \"VISIT\"))) #> Error in example_fun(c(\"USUBJID\", \"PARAMCD\", \"VISIT\")) : #> Argument `by_vars` must be class , but is a character vector. try(example_fun(exprs(USUBJID, toupper(PARAMCD), desc(AVAL)))) #> Error in example_fun(exprs(USUBJID, toupper(PARAMCD), desc(AVAL))) : #> Each element of the list in argument `by_vars` must be class/type #> . #> ℹ But, element 2 is a call, and element 3 is a call example_fun_name <- function(by_vars) { assert_vars(by_vars, expect_names = TRUE) } example_fun_name(exprs(APERSDT = APxxSDT, APEREDT = APxxEDT)) try(example_fun_name(exprs(APERSDT = APxxSDT, APxxEDT))) #> Error in example_fun_name(exprs(APERSDT = APxxSDT, APxxEDT)) : #> All elements of `by_vars` argument must be named. #> ℹ The indices of the unnamed elements are 2"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Variable-Value List? — assert_varval_list","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"Checks argument list expressions expressions variable-value pairs. value can symbol, string, numeric, expression, NA.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"","code":"assert_varval_list( arg, required_elements = NULL, accept_expr = TRUE, accept_var = FALSE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_varval_list\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"arg function argument checked required_elements character vector names must present arg accept_expr expressions right hand side accepted? accept_var unnamed variable names (e.g. exprs(USUBJID)) right hand side accepted? optional checked argument optional? set FALSE arg NULL error thrown. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"function throws error arg list variable-value expressions. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) example_fun <- function(vars) { assert_varval_list(vars) } example_fun(exprs(DTHDOM = \"AE\", DTHSEQ = AESEQ)) try(example_fun(exprs(\"AE\", DTSEQ = AESEQ))) #> Error in example_fun(exprs(\"AE\", DTSEQ = AESEQ)) : #> Argument `vars` must be a named list of expressions where each element #> is a symbol, character scalar, numeric scalar, an expression, or NA, but is a #> list. #> ℹ To create a list of expressions use `exprs()`."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/backquote.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap a String in Backquotes — backquote","title":"Wrap a String in Backquotes — backquote","text":"Wrap String Backquotes","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/backquote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap a String in Backquotes — backquote","text":"","code":"backquote(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/backquote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap a String in Backquotes — backquote","text":"x character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/backquote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrap a String in Backquotes — backquote","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/contains_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","title":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","text":"check argument contains valid variable(s) created exprs() Source Variables List Expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/contains_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","text":"","code":"contains_vars(arg)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/contains_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","text":"arg function argument checked","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/contains_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","text":"TRUE variables valid variable","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/convert_dtm_to_dtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","title":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","text":"Helper Function Convert Date (Date-time) Objects Characters dtc Format (-DTC type variable)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/convert_dtm_to_dtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","text":"","code":"convert_dtm_to_dtc(dtm)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/convert_dtm_to_dtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","text":"dtm date date-time","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/convert_dtm_to_dtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dataset_vignette.html","id":null,"dir":"Reference","previous_headings":"","what":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","title":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","text":"Output dataset vignette pre-specified admiral format.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dataset_vignette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","text":"","code":"dataset_vignette(dataset, display_vars = NULL, filter = NULL)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dataset_vignette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","text":"dataset Dataset output vignette display_vars Variables selected demonstrate outcome derivation Permitted Values: list variables Default NULL display_vars NULL, selected variables visible vignette variables hidden. can made visible clicking theChoose columns display button. filter Filter condition specified condition applied dataset displayed. Permitted Values: condition","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dataset_vignette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","text":"HTML table","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dquote.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap a String in Double Quotes — dquote","title":"Wrap a String in Double Quotes — dquote","text":"Wrap string double quotes, e.g., displaying character values messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dquote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap a String in Double Quotes — dquote","text":"","code":"dquote(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dquote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap a String in Double Quotes — dquote","text":"x character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dquote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrap a String in Double Quotes — dquote","text":"input NULL, text \"NULL\" returned. Otherwise, input double quotes returned.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":null,"dir":"Reference","previous_headings":"","what":"Enumerate Multiple Elements — enumerate","title":"Enumerate Multiple Elements — enumerate","text":"Enumerate multiple elements vector list.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enumerate Multiple Elements — enumerate","text":"","code":"enumerate(x, quote_fun = backquote, conjunction = \"and\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enumerate Multiple Elements — enumerate","text":"x vector list quote_fun Quoting function, defaults backquote. set NULL, elements quoted. conjunction Character used message, defaults \"\".","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enumerate Multiple Elements — enumerate","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enumerate Multiple Elements — enumerate","text":"","code":"enumerate(c(\"one\", \"two\", \"three\")) #> Warning: `enumerate()` was deprecated in admiraldev 1.1.0. #> ℹ This function was primarily used in error messaging, and can be replaced with #> 'cli' functionality: `cli::cli_abort('{.val {letters[1:3]}}')` #> [1] \"`one`, `two` and `three`\" enumerate(c(1, 2, 3), quote_fun = NULL) #> [1] \"1, 2 and 3\""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":null,"dir":"Reference","previous_headings":"","what":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"Uses diffdf::diffdf() compares 2 datasets differences. function can thought R-equivalent SAS proc compare useful tool unit testing well.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"","code":"expect_dfs_equal(base, compare, keys, ...)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"base Input dataset compare Comparison dataset keys character vector variables define unique row base compare datasets ... Additional arguments passed onto diffdf::diffdf()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"error base compare match NULL invisibly ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"","code":"library(dplyr, warn.conflicts = FALSE) tbl1 <- tribble( ~USUBJID, ~AGE, ~SEX, \"1001\", 18, \"M\", \"1002\", 19, \"F\", \"1003\", 20, \"M\", \"1004\", 18, \"F\" ) tbl2 <- tribble( ~USUBJID, ~AGE, ~SEX, \"1001\", 18, \"M\", \"1002\", 18.9, \"F\", \"1003\", 20, NA ) try(expect_dfs_equal(tbl1, tbl2, keys = \"USUBJID\")) #> Error : Differences found between the objects! #> #> A summary is given below. #> #> There are rows in BASE that are not in COMPARE !! #> All rows are shown in table below #> #> ========= #> USUBJID #> --------- #> 1004 #> --------- #> #> Not all Values Compared Equal #> All rows are shown in table below #> #> ============================= #> Variable No of Differences #> ----------------------------- #> AGE 1 #> SEX 1 #> ----------------------------- #> #> #> All rows are shown in table below #> #> ================================== #> VARIABLE USUBJID BASE COMPARE #> ---------------------------------- #> AGE 1002 19 18.9 #> ---------------------------------- #> #> #> All rows are shown in table below #> #> ================================== #> VARIABLE USUBJID BASE COMPARE #> ---------------------------------- #> SEX 1003 M #> ---------------------------------- #> tlb3 <- tribble( ~USUBJID, ~AGE, ~SEX, \"1004\", 18, \"F\", \"1003\", 20, \"M\", \"1002\", 19, \"F\", \"1001\", 18, \"M\", ) # Note the sorting order of the keys is not required expect_dfs_equal(tbl1, tlb3, keys = \"USUBJID\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expr_c.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate One or More Expressions — expr_c","title":"Concatenate One or More Expressions — expr_c","text":"Concatenate One Expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expr_c.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate One or More Expressions — expr_c","text":"","code":"expr_c(...)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expr_c.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate One or More Expressions — expr_c","text":"... One expressions list expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expr_c.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate One or More Expressions — expr_c","text":"list expressions","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract All Symbols from a List of Expressions — extract_vars","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"Extract Symbols List Expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"","code":"extract_vars(x, side = \"lhs\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"x R object side One \"lhs\" (default) \"rhs\" formulas","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"list expressions","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"","code":"library(rlang) extract_vars(exprs(PARAMCD, (BASE - AVAL) / BASE + 100)) #> [[1]] #> PARAMCD #> #> [[2]] #> BASE #> #> [[3]] #> AVAL #> extract_vars(AVAL ~ ARMCD + AGEGR1) #> [[1]] #> AVAL #> extract_vars(AVAL ~ ARMCD + AGEGR1, side = \"rhs\") #> [[1]] #> ARMCD #> #> [[2]] #> AGEGR1 #>"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/filter_if.html","id":null,"dir":"Reference","previous_headings":"","what":"Optional Filter — filter_if","title":"Optional Filter — filter_if","text":"Filters input dataset provided expression NULL","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/filter_if.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optional Filter — filter_if","text":"","code":"filter_if(dataset, filter)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/filter_if.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optional Filter — filter_if","text":"dataset Input dataset filter filter condition. Must expression.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/filter_if.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Optional Filter — filter_if","text":"data.frame containing rows dataset matching filter just dataset filter NULL","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Return English-friendly messaging for object-types — friendly_type_of","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"Return English-friendly messaging object-types","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"","code":"friendly_type_of(x, value = TRUE, length = FALSE)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"x R object. value Whether describe value x. length Whether mention length vectors lists.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"string describing type. Starts indefinite article, e.g. \"integer vector\".","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"helper function aids us forming user-friendly messages gets called what_is_it(), often used assertion functions identify object-type user passed argument instead expected-type.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_constant_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Constant Variables — get_constant_vars","title":"Get Constant Variables — get_constant_vars","text":"Get Constant Variables","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_constant_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Constant Variables — get_constant_vars","text":"","code":"get_constant_vars(dataset, by_vars, ignore_vars = NULL)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_constant_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Constant Variables — get_constant_vars","text":"dataset data frame. by_vars variables groups defined variables considered separately. .e., variable constant within group, returned. ignore_vars Variables ignore specified variables considered, .e., returned even constant (unless included variables). Permitted Values: list variable names selector function calls like starts_with(\"EX\")","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_constant_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Constant Variables — get_constant_vars","text":"Variable vector.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"Retrieve Dataset admiraldev_environment environment","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"","code":"get_dataset(name)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"name name dataset retrieve","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"data.frame","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"Sometimes, developers may want provide information users fit warning error message. example, input dataset function contains unexpected records, can stored separate dataset, users can access investigate issue. achieve , R data structure known 'environment'. environment objects created build time, can populated values package loaded update values course R session. , establishment admiraldev_environment allows us create dynamic data/objects based user-inputs need modification. purpose get_dataset retrieve datasets contained inside admiraldev_environment. Currently support two datasets inside admiraldev_environment object: one_to_many many_to_one","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Duplicates From a Vector — get_duplicates","title":"Get Duplicates From a Vector — get_duplicates","text":"Get Duplicates Vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Duplicates From a Vector — get_duplicates","text":"","code":"get_duplicates(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Duplicates From a Vector — get_duplicates","text":"x atomic vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Duplicates From a Vector — get_duplicates","text":"vector type x contain duplicate values","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Duplicates From a Vector — get_duplicates","text":"","code":"get_duplicates(1:10) #> integer(0) get_duplicates(c(\"a\", \"a\", \"b\", \"c\", \"d\", \"d\")) #> [1] \"a\" \"d\""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"Get New Temporary Variable Name Dataset","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"","code":"get_new_tmp_var(dataset, prefix = \"tmp_var\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"dataset input dataset prefix prefix new temporary variable name create","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"name new temporary variable symbol","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"function returns new unique temporary variable name used inside dataset. temporary variable names structure prefix_n n integer, e.g. tmp_var_1. already variable inside datset given prefix suffix increased 1, e.g. tmp_var_1 already exists get_new_tmp_var() return tmp_var_2.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"","code":"library(dplyr, warn.conflicts = FALSE) dm <- tribble( ~DOMAIN, ~STUDYID, ~USUBJID, \"DM\", \"STUDY X\", \"01-701-1015\", \"DM\", \"STUDY X\", \"01-701-1016\", ) tmp_var <- get_new_tmp_var(dm) mutate(dm, !!tmp_var := NA) #> # A tibble: 2 × 4 #> DOMAIN STUDYID USUBJID tmp_var_1 #> #> 1 DM STUDY X 01-701-1015 NA #> 2 DM STUDY X 01-701-1016 NA"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_source_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Source Variables from a List of Expressions — get_source_vars","title":"Get Source Variables from a List of Expressions — get_source_vars","text":"Get Source Variables List Expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_source_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Source Variables from a List of Expressions — get_source_vars","text":"","code":"get_source_vars(expressions, quosures)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_source_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Source Variables from a List of Expressions — get_source_vars","text":"expressions list expressions quosures Deprecated, please use expressions instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_source_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Source Variables from a List of Expressions — get_source_vars","text":"list expressions","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-notin-grapes.html","id":null,"dir":"Reference","previous_headings":"","what":"Negated Value Matching — %notin%","title":"Negated Value Matching — %notin%","text":"Returns logical vector indicating match left operand right operand.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-notin-grapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Negated Value Matching — %notin%","text":"","code":"x %notin% table"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-notin-grapes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Negated Value Matching — %notin%","text":"x values matched table values matched ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-notin-grapes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Negated Value Matching — %notin%","text":"logical vector","code":""},{"path":[]},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-or-grapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Or — %or%","text":"","code":"lhs %or% rhs"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-or-grapes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Or — %or%","text":"lhs valid R expression rhs valid R expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-or-grapes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Or — %or%","text":"Either result evaluating lhs, rhs error","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-or-grapes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Or — %or%","text":"function evaluates expression lhs expression results error, catches error proceeds evaluating expression rhs returns result.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_auto.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if the argument equals the auto keyword — is_auto","title":"Checks if the argument equals the auto keyword — is_auto","text":"Checks argument equals auto keyword","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_auto.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if the argument equals the auto keyword — is_auto","text":"","code":"is_auto(arg)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_auto.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if the argument equals the auto keyword — is_auto","text":"arg argument check","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_auto.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if the argument equals the auto keyword — is_auto","text":"TRUE argument equals auto keyword, .e., expression symbol named auto.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_order_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Is order vars? — is_order_vars","title":"Is order vars? — is_order_vars","text":"Check inputs created using exprs() calls involving desc()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_order_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is order vars? — is_order_vars","text":"","code":"is_order_vars(arg)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_order_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is order vars? — is_order_vars","text":"arg R object","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_order_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is order vars? — is_order_vars","text":"FALSE argument list order vars","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_valid_dtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Is this string a valid DTC — is_valid_dtc","title":"Is this string a valid DTC — is_valid_dtc","text":"string valid DTC","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_valid_dtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is this string a valid DTC — is_valid_dtc","text":"","code":"is_valid_dtc(arg)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_valid_dtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is this string a valid DTC — is_valid_dtc","text":"arg character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_valid_dtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is this string a valid DTC — is_valid_dtc","text":"TRUE argument valid --DTC string, FALSE otherwise","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/joins.html","id":null,"dir":"Reference","previous_headings":"","what":"Join Functions — anti_join","title":"Join Functions — anti_join","text":"*_join() functions {dplyr} without warning different attributes datasets.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/joins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join Functions — anti_join","text":"","code":"anti_join(x, y, by = NULL, copy = FALSE, ...) inner_join(x, y, by = NULL, copy = FALSE, suffix = c(\".x\", \".y\"), ...) left_join(x, y, by = NULL, copy = FALSE, suffix = c(\".x\", \".y\"), ...)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/joins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join Functions — anti_join","text":"x data.frame y data.frame character vector copy logical ... Additional arguments suffix character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/joins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join Functions — anti_join","text":"data.frame","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":null,"dir":"Reference","previous_headings":"","what":"Process set_values_to Argument — process_set_values_to","title":"Process set_values_to Argument — process_set_values_to","text":"function creates variables specified set_values_to argument, catches errors, provides user friendly error messages, optionally checks type created variables.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process set_values_to Argument — process_set_values_to","text":"","code":"process_set_values_to(dataset, set_values_to = NULL, expected_types = NULL)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process set_values_to Argument — process_set_values_to","text":"dataset Input dataset set_values_to Variables set named list returned exprs() defining variables set, e.g. exprs(PARAMCD = \"OS\", PARAM = \"Overall Survival\") expected. values must symbols, character strings, numeric values, expressions, NA. expected_types argument specified, specified variables checked whether specified type matches type variables created set_values_to. Permitted Values: character vector values \"numeric\" \"character\"","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process set_values_to Argument — process_set_values_to","text":"input dataset variables specified set_values_to added/updated","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process set_values_to Argument — process_set_values_to","text":"","code":"library(dplyr) data <- tribble( ~AVAL, 20 ) try( process_set_values_to( data, set_values_to = exprs( PARAMCD = BMI ) ) ) #> Error in process_set_values_to(data, set_values_to = exprs(PARAMCD = BMI)) : #> Assigning variables failed! #> • `set_values_to = exprs(PARAMCD = BMI)` #> See error message below: #> ℹ In argument: `PARAMCD = BMI`. Caused by error: ! object 'BMI' not found try( process_set_values_to( data, set_values_to = exprs( PARAMCD = 42 ), expected_types = c(PARAMCD = \"character\") ) ) #> Error in process_set_values_to(data, set_values_to = exprs(PARAMCD = 42), : #> The following variables have an unexpected type: #> • PARAMCD: expected is , but it is ."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"Remove Temporary Variables Created Within Current Function Environment","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"","code":"remove_tmp_vars(dataset)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"dataset input dataset","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"input dataset temporary variables removed","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"","code":"library(dplyr, warn.conflicts = FALSE) dm <- tribble( ~DOMAIN, ~STUDYID, ~USUBJID, \"DM\", \"STUDY X\", \"01-701-1015\", \"DM\", \"STUDY X\", \"01-701-1016\", ) dm <- select(dm, USUBJID) tmp_var <- get_new_tmp_var(dm) dm <- mutate(dm, !!tmp_var := NA) ## This function creates two new temporary variables which are removed when calling ## `remove_tmp_vars()`. Note that any temporary variable created outside this ## function is **not** removed do_something <- function(dataset) { tmp_var_1 <- get_new_tmp_var(dm) tmp_var_2 <- get_new_tmp_var(dm) dm %>% mutate(!!tmp_var_1 := NA, !!tmp_var_2 := NA) %>% print() %>% remove_tmp_vars() } do_something(dm) #> # A tibble: 2 × 4 #> USUBJID tmp_var_1 tmp_var_2 tmp_var_3 #> #> 1 01-701-1015 NA NA NA #> 2 01-701-1016 NA NA NA #> # A tibble: 2 × 2 #> USUBJID tmp_var_1 #> #> 1 01-701-1015 NA #> 2 01-701-1016 NA"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Symbols in an Expression — replace_symbol_in_expr","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"Replace symbols expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"","code":"replace_symbol_in_expr(expression, target, replace)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"expression Expression target Target symbol replace Replacing symbol","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"expression every occurrence symbol target replaced replace","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"Stefan Bundfuss","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"","code":"library(rlang) replace_symbol_in_expr(expr(AVAL), target = AVAL, replace = AVAL.join) #> AVAL.join replace_symbol_in_expr(expr(AVALC), target = AVAL, replace = AVAL.join) #> AVALC replace_symbol_in_expr(expr(desc(AVAL)), target = AVAL, replace = AVAL.join) #> desc(AVAL.join)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Expression Value with Name — replace_values_by_names","title":"Replace Expression Value with Name — replace_values_by_names","text":"Replace Expression Value Name","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Expression Value with Name — replace_values_by_names","text":"","code":"replace_values_by_names(expressions, quosures)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Expression Value with Name — replace_values_by_names","text":"expressions list expressions quosures Deprecated, please use expressions instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace Expression Value with Name — replace_values_by_names","text":"list expressions","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replace Expression Value with Name — replace_values_by_names","text":"","code":"library(rlang) replace_values_by_names(exprs(AVAL, ADT = convert_dtc_to_dt(EXSTDTC))) #> [[1]] #> AVAL #> #> $ADT #> ADT #>"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/squote.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap a String in Single Quotes — squote","title":"Wrap a String in Single Quotes — squote","text":"Wrap String Single Quotes","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/squote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap a String in Single Quotes — squote","text":"","code":"squote(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/squote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap a String in Single Quotes — squote","text":"x character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/squote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrap a String in Single Quotes — squote","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":null,"dir":"Reference","previous_headings":"","what":"Suppress Specific Warnings — suppress_warning","title":"Suppress Specific Warnings — suppress_warning","text":"Suppress certain warnings issued expression.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Suppress Specific Warnings — suppress_warning","text":"","code":"suppress_warning(expr, regexpr)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Suppress Specific Warnings — suppress_warning","text":"expr Expression executed regexpr Regular expression matching warnings suppress","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Suppress Specific Warnings — suppress_warning","text":"Return value expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Suppress Specific Warnings — suppress_warning","text":"warnings issued expression match regular expression suppressed.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/valid_time_units.html","id":null,"dir":"Reference","previous_headings":"","what":"Valid Time Units — valid_time_units","title":"Valid Time Units — valid_time_units","text":"Contains acceptable character vector valid time units","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/valid_time_units.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Valid Time Units — valid_time_units","text":"","code":"valid_time_units()"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/valid_time_units.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Valid Time Units — valid_time_units","text":"character vector valid time units","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":null,"dir":"Reference","previous_headings":"","what":"Turn a List of Expressions into a Character Vector — vars2chr","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"Turn List Expressions Character Vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"","code":"vars2chr(expressions, quosures)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"expressions list expressions created using exprs() quosures Deprecated, please use expressions instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) vars2chr(exprs(USUBJID, AVAL)) #> #> \"USUBJID\" \"AVAL\""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_incomplete_dtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Warn if incomplete dtc — warn_if_incomplete_dtc","title":"Warn if incomplete dtc — warn_if_incomplete_dtc","text":"Warn incomplete dtc","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_incomplete_dtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Warn if incomplete dtc — warn_if_incomplete_dtc","text":"","code":"warn_if_incomplete_dtc(dtc, n)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_incomplete_dtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Warn if incomplete dtc — warn_if_incomplete_dtc","text":"dtc character vector date-times ISO 8601 format n non-negative integer","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_incomplete_dtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Warn if incomplete dtc — warn_if_incomplete_dtc","text":"warning dtc contains partial dates","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"Checks two list inputs names number elements issues warning otherwise.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"","code":"warn_if_inconsistent_list(base, compare, list_name, i = 2)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"base named list compare named list list_name string name list index id compare 2 lists","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"warning 2 lists different names length","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) # no warning warn_if_inconsistent_list( base = exprs(DTHDOM = \"DM\", DTHSEQ = DMSEQ), compare = exprs(DTHDOM = \"DM\", DTHSEQ = DMSEQ), list_name = \"Test\" ) # warning warn_if_inconsistent_list( base = exprs(DTHDOM = \"DM\", DTHSEQ = DMSEQ, DTHVAR = \"text\"), compare = exprs(DTHDOM = \"DM\", DTHSEQ = DMSEQ), list_name = \"Test\" ) #> Warning: The variables used for traceability in `Test` are not consistent, please check: #> source 1 , Variables are given as: DTHDOM DTHSEQ DTHVAR #> source 2 , Variables are given as: DTHDOM DTHSEQ"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"Warn vector contains unknown datetime format \"2003-12-15T-:15:18\", \"2003-12-15T13:-:19\",\"--12-15\",\"-----T07:15\"","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"","code":"warn_if_invalid_dtc(dtc, is_valid = is_valid_dtc(dtc))"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"dtc character vector containing dates is_valid logical vector indicating whether elements dtc valid","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"return value, called side effects","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"","code":"## No warning as `dtc` is a valid date format warn_if_invalid_dtc(dtc = \"2021-04-06\") ## Issues a warning warn_if_invalid_dtc(dtc = \"2021-04-06T-:30:30\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":null,"dir":"Reference","previous_headings":"","what":"Warn If a Variable Already Exists — warn_if_vars_exist","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"Warn variable already exists inside dataset","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"","code":"warn_if_vars_exist(dataset, vars)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"dataset data.frame vars character vector columns check dataset","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"return value, called side effects","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"","code":"library(dplyr, warn.conflicts = FALSE) dm <- tribble( ~USUBJID, ~ARM, \"01-701-1015\", \"Placebo\", \"01-701-1016\", \"Placebo\", ) ## No warning as `AAGE` doesn't exist in `dm` warn_if_vars_exist(dm, \"AAGE\") ## Issues a warning warn_if_vars_exist(dm, \"ARM\") #> Warning: Variable \"ARM\" already exists in the dataset."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":null,"dir":"Reference","previous_headings":"","what":"What Kind of Object is This? — what_is_it","title":"What Kind of Object is This? — what_is_it","text":"Returns string describing kind object input .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"What Kind of Object is This? — what_is_it","text":"","code":"what_is_it(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"What Kind of Object is This? — what_is_it","text":"x R object","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"What Kind of Object is This? — what_is_it","text":"character description type x","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"What Kind of Object is This? — what_is_it","text":"","code":"what_is_it(\"abc\") #> Warning: `what_is_it()` was deprecated in admiraldev 1.1.0. #> ℹ This function was primarily used in error messaging, and can be replaced with #> 'cli' functionality: `cli::cli_abort('{.obj_type_friendly {letters}}')`. #> [1] \"`\\\"abc\\\"`\" what_is_it(1L) #> [1] \"`1`\" what_is_it(1:10) #> [1] \"an integer vector\" what_is_it(mtcars) #> [1] \"a data frame\""},{"path":[]},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-development-version","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev (development version)","text":"Error messaging throughout package updated rlang::abort() cli::cli_abort(). part update, assert_*() functions new arguments assert_*(message, arg_name, call, class). (#367) Warning messaging also updated use cli messaging.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-development-version","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev (development version)","text":"renv related files removed. (#360) longer exporting is_named() function. (#401) pharmaversesdtm removed dependency. (#434) part error messaging update, following changes made. assert_s3_class(class) argument renamed assert_s3_class(cls). (#367) Functions arg_name(), enumerate(), what_is_it(), friendly_type_of() deprecated warning returned developer using functions. developer functions (opposed functions typical admiral users), use short deprecation cycle.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-development-version","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev (development version)","text":"“Release Strategy” vignette updated respect new branching strategy. (#353) “Release Strategy” vignette now contains short new “Release Tracking” section linking external dashboard CRAN packages awaiting release. (#358)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"other-development-version","dir":"Changelog","previous_headings":"","what":"Other","title":"admiraldev (development version)","text":"Removed dependencies needed build package package documentation. (#426) Increased minimum R version required 4.0 match {admiral}. (#382)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-100","dir":"Changelog","previous_headings":"","what":"admiraldev 1.0.0","title":"admiraldev 1.0.0","text":"CRAN release: 2023-12-15","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-1-0-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 1.0.0","text":"assert_function() now accepts function arguments ellipsis, ... function formals (#339)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-1-0-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 1.0.0","text":"assert_function_param() assert_named_expr() assert_has_variables()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-1-0-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 1.0.0","text":"New documentation programming strategy around quoting/expressions standardizing roxygen texts (#233, #332) New documentation use footnotes writing vignettes (#324) Updated language images adopt GitHub Flow Strategy (#349)","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-050","dir":"Changelog","previous_headings":"","what":"admiraldev 0.5.0","title":"admiraldev 0.5.0","text":"CRAN release: 2023-09-11","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-5-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.5.0","text":"Calls admiral.test swapped pharmaversesdtm (#321) New vignette package writing extensions now available (#295, #312) New vignette creating test data now available (#282)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-0-5-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 0.5.0","text":"messaging warn_if_invalid_dtc() updated align date/datetime functions admiral currently . (#316)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-5-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.5.0","text":"assert_order_vars() quo_c() quo_not_missing() replace_symbol_in_quo() quosures argument replaced expressions argument replace_values_by_names(), get_source_vars(), vars2chr(). (#288) assert_function_param() deprecated favor assert_function(). (#264) assert_named_expr() deprecated favor assert_expr_list(). (#264) assert_has_variables() deprecated favor assert_data_frame(). (#264)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-5-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.5.0","text":"Guidance around issues merging updated (#286) Common R CMD troubleshooting made separate vignette (#286) Documentation get_dataset() improved. (#271) Minor updates programming strategy added (#213, #240, #260) Updated unit testing vignette snapshot testing guidance. (#302) Documentation friendly_type_of() provided (#22) Minor updates pull request review guidance added (#201, #292) Documentation singular versus plural function argument names added programming strategy vignette. Also documentation common arguments missing_value missing_values added. (#296) Documentation highlighting difference set_values_to keep_source_vars (#318) List common arguments updated (#306)","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-040","dir":"Changelog","previous_headings":"","what":"admiraldev 0.4.0","title":"admiraldev 0.4.0","text":"CRAN release: 2023-06-06","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-4-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.4.0","text":"New function assert_named() check elements argument named (#241) New function assert_expr_list() check argument list expressions (#241) Added Report bug link admiraldev website (#257)","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-4-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.4.0","text":"assert_order_vars() deprecated favor assert_expr_list(). (#241) following functions deprecated previous admiral versions using next phase deprecation process: (#272) quo_c() quo_not_missing() replace_symbol_in_quo() quosures argument replaced expressions argument replace_values_by_names().","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-4-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.4.0","text":"deprecation strategy updated regarding unit tests deprecated functions/arguments phase 1. (#247) programming strategy updated regarding permitted values calling functions package dependencies (#72, #253)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-030","dir":"Changelog","previous_headings":"","what":"admiraldev 0.3.0","title":"admiraldev 0.3.0","text":"CRAN release: 2023-03-06","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-3-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.3.0","text":"New function process_set_values_to() creating variables specified set_value_to argument catching errors (#70)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-0-3-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 0.3.0","text":"Using testthat3e (testthat 3rd edition) unit testing. stricter messages must addressed deprecated functions throw errors. (#230) Slight boost test coverage dev_utilities (#102) Fix datatable styling documentation (#197) assert_character_vector() function gained named argument check elements vector named. (#70) assert_list_of() function gained named argument check elements list named. (#203) quote_fun argument enumerate() extended NULL can specified request quoting elements. (#203) assert_list_of() function enhanced also considers type element, e.g., check value list symbols. (#208)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-3-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.3.0","text":"default value optional argument assert_date_vector(), assert_list_of(), assert_s3_class() changed TRUE FALSE make default behavior consistent. (#87) quo_c() replace_symbol_in_quo() quosures argument get_source_vars(), replace_values_by_names(), vars2chr()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-3-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.3.0","text":"New section programming strategy regarding comments (#71) Removed requirement add @author tags code scripts programming strategy, tracking authors DESCRIPTION file. Authors removed function documentation line update. (#206, #210) Removed -boarding Issue Template (#225) Increased clarity scope package (#232)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-020","dir":"Changelog","previous_headings":"","what":"admiraldev 0.2.0","title":"admiraldev 0.2.0","text":"CRAN release: 2022-11-30","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-2-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.2.0","text":"Developer addin formatting tests admiral programming standards (#73) New functions replace_symbol_in_quo() add_suffix_to_vars() (#106) New function assert_atomic_vector() (#98) New keyword/family create_aux functions creating auxiliary datasets (#126) New function assert_date_vector() (#129) New function assert_same_type() (#176) Remove dependency {assertthat} (#149) Test coverage admiraldev increased 45% approximately 100% (#94, #95, #96, #98, #101, #103) Environment objects consolidated single admiraldev_environment object R/admiraldev_environment.R. (#179)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-0-2-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 0.2.0","text":"expect_names argument added assert_vars() check variables named (#117) Remove dplyr function exports migration user facing function negate_vars() admiral (#83)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-2-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.2.0","text":"longer compatible admiral (<0.9)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-2-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.2.0","text":"New vignette package release strategy (#79) Updated multiple roxygen headers (#116, #133, #134, #141, #145, #172) Description admiral options work certain function inputs, .e subject_keys (#133)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"various-0-2-0","dir":"Changelog","previous_headings":"","what":"Various","title":"admiraldev 0.2.0","text":"PR Checklist Template updated (#172) New authors/contributors (#158)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-010","dir":"Changelog","previous_headings":"","what":"admiraldev 0.1.0","title":"admiraldev 0.1.0","text":"CRAN release: 2022-08-26","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-1-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.1.0","text":"Developer specific functions brought admiral Developer specific vignettes brought admiral New admiraldev website created","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-0-1-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 0.1.0","text":"NA","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-1-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.1.0","text":"NA","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-1-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.1.0","text":"NA","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"various-0-1-0","dir":"Changelog","previous_headings":"","what":"Various","title":"admiraldev 0.1.0","text":"NA","code":""}]
+[{"path":"https://pharmaverse.github.io/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/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/admiraldev/dev/articles/admiraldev.html","id":"dear-developers","dir":"Articles","previous_headings":"","what":"Dear Developers","title":"Get Started","text":"admiraldev set tools intended , developer, help make developing within admiral family easier, consistently robust across packages maybe even fun! Tools loosely defined follows: Utility Functions used admiral admiral extension functions custom checks providing custom messages, warnings errors. custom messages, warnings errors succinct, helpful messaging around function expects inputs. inputs admiral functions many, generally fit three categories: datasets, variables arguments. functions start assert_, is_ get_. Utility functions help documentation, testing checking health code base admiral packages. Vignettes working admiral functions, developing unit testing, releases process, vignette writing documentation needs. vignettes intended use across admiral packages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/admiraldev.html","id":"why-have-a-separate-development-package","dir":"Articles","previous_headings":"","what":"Why have a separate development package?","title":"Get Started","text":"admiral package function base grown decided create extension packages use within companies specific TAs help specific problems. intended extension packages follow processes admiral core, e.g. Unit Testing, Roxygen Documentation, Function Design. standalone development package allows us keep date development process developers across family. also feel lot developer functions user-specific gives us freedom create release utility tools specific family packages reduces non-user facing functions within admiral family packages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/admiraldev.html","id":"how-to-add-new-tools-to-admiraldev","dir":"Articles","previous_headings":"","what":"How to add new tools to {admiraldev}?","title":"Get Started","text":"Just like admiral, follow procedures adding issues discuss feature requests, bugs documentation updates. develop issues branches Pull Request Code Review. Experimental tools highly encouraged help reduce repetitive patterns automating boring stuff.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/admiraldev.html","id":"scenario-one-admiral-core","dir":"Articles","previous_headings":"When to add a function to {admiraldev}?","what":"Scenario One: {admiral} core","title":"Get Started","text":"developer working admiral core implements new type derivation function BDS-Findings ADaM dataset. new derivation function two new assert custom checking functions inputs well helper function. Loose guidelines: derivation function always live admiral core. helper function looked see made available within admiraldev extension packages needs reduce repetitive coding across family admiral. generalized, remain admiral. assert custom checking functions always live within admiraldev stay family assertion functions.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/admiraldev.html","id":"scenario-two-admiral-extension","dir":"Articles","previous_headings":"When to add a function to {admiraldev}?","what":"Scenario Two: {admiral} extension","title":"Get Started","text":"developer working admiralonco implements new type derivation function adding certain parameters oncology specific ADaM dataset. new derivation function one new assert custom checking function. Loose guidelines: derivation function closely looked see can generalized ADaM datasets. case, moved admiral core. function specific oncology needs, remain admiralonco. assert custom checking functions follow similar principle - can generalized therapeutic areas move admiraldev, whereas specific oncology needs, remain admiralonco.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Guidance for git and GitHub Usage","text":"article give overview admiral project utilizing version-control software git website GitHub working RStudio. go primary branches house source code admiral project well use Feature branches address Issues. Issues can range bugs enhancements identified requested developers, users testers. also provide bare minimum git commands needed get running. Please refer Resource section -depth guidance using git GitHub.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"branches","dir":"Articles","previous_headings":"","what":"Branches","title":"Guidance for git and GitHub Usage","text":"main branch contains latest development version package. can find released versions gh-pages branches contains code used render R package websites - looking right now! patch branch reserved special hot fixes address bugs rarely used. info Hot Fix Release main, gh-pages, patch branches protection. try push changes branches get error unless administrator. Feature branches actual development related specific issue happens. Feature branches merged main pull request merged. Check Pull Request Review Guidance guidance merging main.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"working-with-feature-branches","dir":"Articles","previous_headings":"","what":"Working with Feature Branches","title":"Guidance for git and GitHub Usage","text":"Feature Branches developers work addressing Issues.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"implementing-an-issue","dir":"Articles","previous_headings":"Working with Feature Branches","what":"Implementing an Issue","title":"Guidance for git and GitHub Usage","text":"feature branch must related issue. encourage new developers work one issue time.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"naming-branches","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Naming Branches","title":"Guidance for git and GitHub Usage","text":"name branch must prefixed issue number, followed short meaningful description. example, given issue #94 “Program function derive LSTALVDT”, branch name 94_derive_var_lstalvdt.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"create-a-new-feature-branch-from-the-terminal-from-main","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Create a New Feature Branch from the Terminal (from main)","title":"Guidance for git and GitHub Usage","text":"Checkout main branch: git checkout main Pull latest changes GitHub: git pull Create new branch main branch switch : git checkout -b ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"create-a-new-feature-branch-from-github-from-main","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Create a New Feature Branch from GitHub (from main)","title":"Guidance for git and GitHub Usage","text":"can also create feature branch GitHub. Switch main branch Type new feature branch name Click Create branch: @main main Sure Pull newly created branch RStudio","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"commits-from-the-terminal-in-rstudio","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Commits from the Terminal in RStudio","title":"Guidance for git and GitHub Usage","text":"start commit process, need tell git move changes staging area. Use git add move changes staging area wait next commit. can use git add . move files worked staging area. Next can commit, takes snapshot staged changes. committing, prefix message issue number add meaningful message git commit –m '#94 last alive date implementation'. Lastly, push changes GitHub using git push origin ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"commits-from-the-git-tab-in-rstudio","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Commits from the Git Tab in RStudio","title":"Guidance for git and GitHub Usage","text":"can also make use Git Tab within RStudio commit changes. benefit using Tab able see changes file red green highlighting. Just like terminal, start message issue number add meaningful succinct sentence. Hit Commit button Push GitHub.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"commit-message-etiquette","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Commit Message Etiquette","title":"Guidance for git and GitHub Usage","text":"require developers insert issue number commit message. Placing issue number commit message allows reviewers quickly find discussion surrounding issue. pushed GitHub issue number hyperlinked issue tracker, powerful tool discussion traceability, think valuable highly regulated industry like Pharma. styles commit messaging permitted:","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"style-1","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Style 1:","title":"Guidance for git and GitHub Usage","text":"feat: #94 skeleton function developed chore: #94 styler lintr update docs: #94 parameters details sections compelted","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"style-2","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Style 2:","title":"Guidance for git and GitHub Usage","text":"#94 skeleton function developed #94 styler lintr update #94 parameters details sections compelted","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"style-3","dir":"Articles","previous_headings":"Working with Feature Branches > Implementing an Issue","what":"Style 3:","title":"Guidance for git and GitHub Usage","text":"skeleton function developed (#94) styler lintr update (#94) parameters details sections compelted (#94)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"pull-request","dir":"Articles","previous_headings":"Working with Feature Branches","what":"Pull request","title":"Guidance for git and GitHub Usage","text":"recommend thorough read articles, Pull Request Review Guidance Programming Strategy -depth discussions proper Pull Request.Pull Request authors benefit shorter review times closely following guidance provided two articles. discuss simple git commands terminal GitHub Pull Request. recommend Pull Request GitHub terminal. changes committed, push updated branch GitHub:git push -u origin GitHub, Pull requests, user either “Compare pull request” button /“Create Pull Request”. first button created GitHub detects recent changes made. branch merge must main branch (base = main) compare branch new branch merge - shown picture. Please pay close attention branch merging ! issue must linked pull request “Development” field Pull Request. cases, linkage automatically close issue move Done column project board. completed Pull Request see committed changes available reviewer. reviewer must specified Pull Request. recommended write brief summary reviewers can quickly come speed Pull Request. Images updates nice , easy GitHub! Use Screen Capture software Copy Paste summary.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"reviewingclosing-an-issue","dir":"Articles","previous_headings":"Working with Feature Branches > Pull request","what":"Reviewing/Closing an Issue","title":"Guidance for git and GitHub Usage","text":"least one reviewer must approve Pull Request. Please review Pull Request Review Guidance, provides depth guidance proper Pull Request. reviewer must ensure function follows programming strategy recommendations. comment/question/discussion must addressed documented GitHub Pull Request merged review completed, reviewer merge Pull Request feature branch automatically deleted. merging Pull Request please check corresponding moved done column Project Board. Also, please make sure issue closed.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"solving-merge-conflicts-in-the-terminal-on-rstudio","dir":"Articles","previous_headings":"Working with Feature Branches > Pull request","what":"Solving Merge Conflicts in the Terminal on RStudio","title":"Guidance for git and GitHub Usage","text":"Merge conflict situation git decide changes apply since multiple updates part file. typically happens multiple people update part code. conflicts always need handled manually (code updates may required): provides list files conflicts file conflicts conflicting sections marked <<<<<<<, =======, >>>>>>>. code markers must updated markers removed. Source files need updated manually. Generated files like NAMESPACE generated documentation files updated manually recreated source files updated. make changes available call:","code":"git checkout main git pull git checkout git merge main git add git commit -m \"\" git push"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"solving-merge-conflicts-in-github","dir":"Articles","previous_headings":"Working with Feature Branches > Pull request","what":"Solving Merge Conflicts in GitHub","title":"Guidance for git and GitHub Usage","text":"simple merge conflicts, developers can make use GitHub interface solve . GitHub show number conflicts two branches. image, GitHub found 3 conflicts, display first one. Just like terminal, GitHub make use <<<<<<<, =======, >>>>>>> highlight conflicting sections. need make decision whether keep code base feature branch. decided, go code remove section longer wish keep. sure remove <<<<<<<, =======, >>>>>>> well! work conflicts mark Resolved Commit changes. recommended pull branch back RStudio make sure untoward effects happen branch.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"useful-git-commands","dir":"Articles","previous_headings":"Working with Feature Branches","what":"Useful git Commands","title":"Guidance for git and GitHub Usage","text":"merging: git merge - merge my_branch current branch stashing commands useful one wants go back clean directory git stash - stash (store) current changes restore clean directory git stash pop - put back (restore) stashed changes git revert also helpful ? Using code unmerged branches Checkout unmerged branch want use: git checkout Pull latest committed changes unmerged branch: git pull Check feature branch: git checkout Merge unmerged branch : git merge ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/git_usage.html","id":"github_resources","dir":"Articles","previous_headings":"","what":"Resources on using git, GitHub and RStudio","title":"Guidance for git and GitHub Usage","text":"GitHub RStudio Happy Git GitHub useR","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/package_extensions.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Package Extensions","text":"admiral made family packages foresee growing time cover specific areas TA (Therapeutic Area) package extensions, wider range companies individuals getting board join development efforts. step--step guidance talks recommendations new development teams go creating package extensions. critical guidance followed, users need feel consistent experience working across admiral packages. admiral package extension doesn’t follow conventions wouldn’t include pharmaverse part admiral family.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/package_extensions.html","id":"step-by-step-guidance-to-create-a-package-extension","dir":"Articles","previous_headings":"","what":"Step-by-step Guidance to Create a Package Extension","title":"Package Extensions","text":"Note: ordering numbers suggested don’t need strictly followed sequence. Raise need new admiral package extension admiral Slack channel, directly admiral package maintainer. naming convention needs {admiralxxx} request scope targeted overly narrow, example instead package extension HIV ’d prefer one across virology. Otherwise number packages may become unmanageable. agreed, reach company contacts working similar areas see collaborative development can achieved. recommendation always target least 2 companies start implementation remains robust protect going company-specific route. However, consider 4 5 companies get involved early may slow decision-making. companies agree co-develop, identify lead . One company act driver overall package extension put forward product owner technical lead ultimately final say contentious decisions. product owner cover project decisions (e.g. around scope priorities), whereas technical lead cover technical decisions (e.g. around design implementation). technical lead either: ) already significantly involved admiral core development team developer/contributor, b) join core development team simultaneously. ensure design kept true manifesto consistent style quality respect admiral standards. Agree charter expectations company, e.g. usually ask least 3 developers least 25% capacity mix R, GitHub TA experience. Within charter make sure scope timelines clear. important try boil ocean. Focus first common endpoints required foundation package can build via contributions co-development companies also wider across-industry admiral community. useful, admiralonco charter shared guide. company start identify required developer resources. developer required complete {admiral} dummy issue onboarding, well reading admiraldev documentation, - especially developer guides, need followed package extensions. Optionally can useful host kick-meeting decide team work, recommend agile/scrum practices. Set “admiralxxx_dev” channel Slack add team members informal team chat, agree way share working documents across co-development team. recommend use new folder pharmaverse MS Teams - Michael Rimler (michael.s.rimler@gsk.com) help rep PHUSE board. useful starter development activity look pharmaversesdtm check test data sufficient TA needs, e.g. admiralonco generate new test data SDTM domains RS TU. Note personal data used (even anonymized) important keep data generated -line CDISC pilot data use , .e. use USUBJIDs DM etc. Optionally draft, agree sign collaboration agreement collaborating companies wish, useful protecting secondary IP company standard specifications may shared within team. example stored , work Legal teams required. Share company-specific implementations specifications able harmonize design strategy package extension. important remain pragmatic consider higher perspective one company. Engage company standards representatives find discrepancies across company approaches question really need things differently (health authorities patients benefit ?). Also consider always expect level company-specifics covered internal company package extensions. Set new public GitHub repo pharmaverse org using admiraltemplate - includes set-pieces (CI/CD checks issue/PR templates) enable package stay consistent others admiral family, well core package dependencies versions. See {admiraltemplate} Quick Start Guide Note step requires org member access granted pharmaverse council reps, admins org. Also free add additional package dependencies needed assuming reliable packages used, must depend newer versions packages (always reply “” updates suggested installation). repo available technical lead granted admin access repo set GitHub team name package extension assign required access co-development team members. require write access, may choose give leads admin access well never bottle-neck waiting one person. Update template license file repo adding co-development company names place Roche & GSK - admiral package extensions use Apache 2.0, preferred permissive license. Agree co-development companies required extra wording copyright/IP section. Set project board, , help manage backlog. Assuming work agile/scrum, create product backlog, prioritize make sprint plan. intention always re-use much possible admiral core package. find anything additional needed package extension, first question whether might common need TAs consider instead raising issue admiral core. designing new functions always try stay aligned Programming Strategy. Start development foundational first release 0.1.0. Follow consistent Development Process admiral. Line testers companies others set expectations around believe stable version available user testing. can use admiral Slack community raise interest get involved. Add pharmaverse badge README: https://pharmaverse.org/contribute/badges/ - needs support pharmaverse council rep. Raise admiral repo issue ensure package extension site linked core admiral site .` important admiral family packages keep similar release schedule cadence, order ease adoption users give clear expectations. admiral core package cadence releases one every quarter fixed schedule (every first Monday last month quarter - March, June, September, December). core package set release schedule package extensions follow, .e. admiral releases ’d expect package extension releases targeted within 2 week window. releases communicated via Slack channel well quarterly user community meetings. happy package extension well tested sufficient state make submission CRAN. technical lead named maintainer. CRAN release, advertise via Slack & LinkedIn. Plan future enhancements make issues. team feels ready can open development contributions wider community - see page. Please use good first issue (ideal new starters) & help wanted (ideal experienced contributors) issue labels. Note: core admiral team carry periodic reviews extension package contents ensure nothing duplicated ensure standards best practices followed. frequency reviews agreed upon technical leads core extension packages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/package_extensions.html","id":"lessons-learned","dir":"Articles","previous_headings":"","what":"Lessons Learned","title":"Package Extensions","text":"lessons learned previous package extensions: Since ADaM conceived TA-agnostic, TA standards can widely differ across companies, TA package extensions shouldn’t contain many new functions. , functionality required create ADaM present admiral, localized limited exceptions truly TA-specific variables/endpoints. , R folder package extensions relatively lean! Connected , package extension just R functions - also vignettes examples template programs. fact, just important R functions , users turn guidance. Making sure package always --date respect new admiral releases (e.g. due deprecation functions) crucial task. Maintaining package long-term way ensure success. Beware developing just sake developing! may find reach point stasis extension package journey, much need new development. case, vital avoid working tangential tasks. Instead, focus ensuring existing fit--purpose possible.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Pull Request Review Guidance","text":"document intended guidance creators reviewers pull requests (PRs) admiral package family. PR authors benefit shorter review times closely following guidance provided . pull request main branch signifies issue “addressed”. issue might bug, feature request documentation update. Pull Request merged main branch, issue(s) can closed. Closely following guidance ensure “addressed” issues auto-close merge main.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"review-criteria","dir":"Articles","previous_headings":"","what":"Review Criteria","title":"Pull Request Review Guidance","text":"pull request merged main needs pass automated CI checks appear bottom Pull Request. addition, PR creator reviewer make sure Programming Strategy Development Process followed function ADaM IG compliant function intended (described header corresponding issue) function header properly explains intention function, expected inputs (incl. permitted values parameters) output produced; reading documentation reader able predict output function without read source code function accompanying set unit tests; derivations unit test code coverage least 90%; whole package coverage >= 80% implemented derivation scope admiral, e.g. expect company specific input hard-code company-specific rules meaningful error warning messages issued input invalid documentation created/updated running devtools::document() functions supposed exported listed NAMESPACE file; requires @export tag function header examples print relevant source variables newly created variables /records output NEWS.md file updated entry explains new features changes change user-specific warrants mention development milestone files affected implemented changes, e.g. vignettes templates, updated","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"codeowners-and-pr-guidance","dir":"Articles","previous_headings":"Review Criteria","what":"Codeowners and PR Guidance","title":"Pull Request Review Guidance","text":"creator PR, assignment reviewer can unclear. PRs, feel free select members core development team. individuals scan repository regular basis well may provide /review even originally included selected reviewer. Sometimes, development function vignette falls specific-topic, e.g. labs PK/PD. Please ensure include appropriate reviewer modifying files rely domain-expertise. try maintain active list domain-specific topics automatically tag appropriate reviewer using CODEOWNERS file, located .github folder. interested codeowner, reach development team.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"so-much-red-tape","dir":"Articles","previous_headings":"","what":"So much Red Tape!","title":"Pull Request Review Guidance","text":"admiral development team aware sympathetic great many checks, processes documents needed work order compliant Pull Request. task-list-completed GitHub workflow created help reduce burden contributors providing standardized checklist compiles information Pull Request Review Guidance, Programming Strategy Development Process vignettes. next three sections give high-level overview contributor faces opening PR, contributor interacts task-list-completed workflow PR.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"open-a-pull-request","dir":"Articles","previous_headings":"So much Red Tape!","what":"Open a Pull Request","title":"Pull Request Review Guidance","text":"contributor opens PR lengthy standard text inserted comment section. Please alter automated text. need manually add Closes # title Pull Request. can use Edit button top right forget step start Pull Request. Besides free add additional textual information, screenshots, etc. bottom automated text needed clarify contribute discussion around PR.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"create-a-pull-request","dir":"Articles","previous_headings":"So much Red Tape!","what":"Create a Pull Request","title":"Pull Request Review Guidance","text":"click green Create pull request button automated text inserted turned checklist Pull Request. check box drawn previously mentioned vignettes presented recommended sequence. check boxes meant helpful aid ensuring created compliant Pull Request.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"complete-the-pull-request-checklist","dir":"Articles","previous_headings":"So much Red Tape!","what":"Complete the Pull Request checklist","title":"Pull Request Review Guidance","text":"check boxes linked task-list-completed workflow. need check box acknowledgment done due diligence creating compliant Pull Request. GitHub refresh Pull Request trigger task-list-completed workflow completed task. PR can merged main contributor checked check box items. Please don’t hesitate reach admiral team Slack GitHub Issues tracker think checklist needs amended clarity needed check box item. Note Reviewers: recommend use Squash Merge merging Pull Request. create clean commit history.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"github-actionsci-workflows","dir":"Articles","previous_headings":"","what":"GitHub Actions/CI Workflows","title":"Pull Request Review Guidance","text":"task-list-completed workflow one several workflows/actions used within admiral. workflows live .github/workflows folder important understand use remedy workflow fails. Workflows defined responsible assuring high package quality standards without compromising performance, security, reproducibility.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/pr_review_guidance.html","id":"a-synopsis-of-admirals-workflows","dir":"Articles","previous_headings":"GitHub Actions/CI Workflows","what":"A synopsis of admiral’s workflows","title":"Pull Request Review Guidance","text":"recommend checking README admiralci repository gain understanding workflows/actions used admiral.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Programming Strategy","text":"admiral intended contributed user community, article meant developers want either expand admiral functionalities build top admiral. order keep framework robust across whole community, defined programming strategy followed cases. contributions include, example, company specific derivations ADaM datasets.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"functional-workflow","dir":"Articles","previous_headings":"","what":"Functional Workflow","title":"Programming Strategy","text":"Overall programming follow functional approach. mandate use tidyverse (e.g. dplyr) similar functionality existing base R ADaM dataset built set functions free flow code. ADaM dataset specific programming workflow. function specific purpose supports ADaM Dataset programming workflow. admiral function company specific function. Admiral functions can re-used company specific functions. function belongs one category defined keywords/family. function used derive one multiple variable(s) required unit tested. Functions standard naming convention. Double coding used QC method (absolutely necessary). ADaMs created readable, submission-ready code.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function-design","dir":"Articles","previous_headings":"Functions in R","what":"Function Design","title":"Programming Strategy","text":"Firstly, important explain decide need new derivation functions. derivation rule algorithm common highly similar across different variables/parameters (e.g. study day duration) provide generic function can used satisfy times may needed across different ADaMs. Similarly, feel certain derivation useful beyond single purpose also provide generic function (e.g. instead last known alive date function, extreme date function user find last date selection, example first). Otherwise, feel derivation rule unique need sufficiently complex justify opt dedicated function specific variable/parameter (e.g. treatment-emergent flag AEs). certain variables closely connected (e.g. imputed date corresponding imputation flag) single function provide variables. something needed ADaM achieved simply via existing tidyverse function, wrap admiral function, add unnecessary extra layer users. following principles key designing new function: Modularity - code follows modular approach, .e. steps must clearly separated dedicated purpose. applies scripts creating dataset module create single variable parameter. also complex derivations several steps. Commenting steps key readability. Avoid Copy Paste - similar code used multiple times, put separate function. improves readability maintainability makes unit testing easier. done every simple programming step tidyverse can used. rather computational functions data checks. However, also consider nest many functions. Checks - Whenever function fails, meaningful error message must provided clear reference input caused failure. users dig detailed code want apply function. meaningful error message supports usability. Flexibility - Functions flexible possible long reduce usability. example: source variables newly created variables conditions selecting observations hard-coded. useful argument triggers optional steps, e.g. filter argument specified, input dataset restricted, otherwise step skipped. However, arguments trigger completely different algorithms. example BNRIND derived based BASE based ANRIND. implemented within one function algorithms completely different. BASE used, values categorized ANRIND used, values merged baseline observation.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"input-output-and-side-effects","dir":"Articles","previous_headings":"Functions in R","what":"Input, Output, and Side-effects","title":"Programming Strategy","text":"behavior function determined input, global object, .e. input like datasets, variable names, options, … must provided function arguments. expected input datasets grouped. grouped, function must issue error. function requires grouping, function must provide by_vars argument. output dataset must ungrouped. functions sort (arrange) output dataset end. function needs create temporary variables input dataset, names variables must generated get_new_tmp_var() avoid variables input dataset accidentally overwritten. temporary variables must removed output dataset calling remove_tmp_vars(). developers find need use create environment objects achieve flexibility, use admiral_environment environment object created admiral_environment.R. objects stored environment must documented admiral_environment.R. equivalent environment object .R file exist admiraldev well. details environments work, see relevant sections environments R Packages Advanced R textbooks. general, function must side-effects like creating modifying global objects, printing, writing files, …","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"admiral-options","dir":"Articles","previous_headings":"Functions in R","what":"Admiral Options","title":"Programming Strategy","text":"exception made admiral options, see get_admiral_option() set_admiral_options(), certain pre-defined defaults added flexibility allow user-defined defaults commonly used function arguments e.g. subject_keys currently pre-defined exprs(STUDYID, USUBJID), can modified using set_admiral_options(subject_keys = exprs(...)) top script. reasoning behind relieve user repeatedly changing aforementioned commonly used function arguments multiple times script, may called across many admiral functions. additional flexibility needs added another commonly used function argument e.g. future_input set exprs(...) can added admiral option. function formals define future_input = get_admiral_option(\"future_input\") proceed modify body roxygen documentation set_admiral_options().","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function-names","dir":"Articles","previous_headings":"Functions in R","what":"Function Names","title":"Programming Strategy","text":"Function names start verb use snake case, e.g. derive_var_base(). Please note appropriate var/vars prefix used cases function creates variable(s), regardless presence new_var argument function call. Oftentimes creating new derive_var derive_param function may sort non-trivial calculation involved may want write customized function . creating compute_ function becomes appropriate, calculation portion contained one step part overall derive_ function, reducing clutter main function body assisting debugging. addition, compute_ function implemented calculation used one derivation. example compute_bmi() used derive baseline BMI variable ADSL (based baseline weight baseline height variables) also used derive BMI parameter ADVS (based weight height parameters). Please see compute_age_years() derive_var_age_years() another example.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function-arguments","dir":"Articles","previous_headings":"Functions in R","what":"Function Arguments","title":"Programming Strategy","text":"default value optional arguments NULL. recommended argument order contributors asked adhere (order keep consistency across functions): dataset (additional datasets denoted dataset_*) by_vars order new_var (related new_var_* arguments) filter (additional filters denoted filter_*) Make sure always mention start_date end_date (related). Names variables inside dataset passed symbols rather strings, .e. AVAL rather \"AVAL\". argument accepts one variables expressions input variables expressions wrapped inside exprs(). example: new_var = TEMPBL by_vars = exprs(PARAMCD, AVISIT) filter = PARAMCD == \"TEMP\" order = exprs(AVISIT, desc(AESEV)) new_vars = exprs(LDOSE = EXDOSE, LDOSEDT = convert_dtc_to_dt(EXSTDTC)) function argument needs tested assert_ type function. expression needs tested following (many utility functions admiral available contributor): whether expression (list expressions, depending function) whether valid expression (.e. whether evaluates without error)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"common-function-arguments-naming-convention","dir":"Articles","previous_headings":"Functions in R","what":"Common Function Arguments Naming Convention","title":"Programming Strategy","text":"first argument derive_ functions input dataset named dataset. one input dataset required, input dataset start dataset_, e.g., dataset_ex. Arguments specifying items add start new_. variable added, second part argument name var, parameter added, param. example: new_var, new_var_unit, new_param. Arguments expect boolean boolean vector must start verb, e.g., is_imputed impute_date. Arguments expect one value variable name must singular version word(s), e.g., missing_value new_var. Arguments expect several values variable names (list, expressions, etc.) must plural version word(s), e.g., missing_values new_vars.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"source-code-formatting","dir":"Articles","previous_headings":"Functions in R","what":"Source Code Formatting","title":"Programming Strategy","text":"source code formatted according tidyverse style guide. lintr styler packages used check enforce .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"comments","dir":"Articles","previous_headings":"Functions in R","what":"Comments","title":"Programming Strategy","text":"Comments added help readers author understand code. two main cases: intention chunk code clear, comment added. comment rephrase code provide additional information. Bad Good long functions (>100 lines) comments can added structure code simplify navigation. case comment end ---- add entry document outline RStudio. example: formatting comments must follow tidyverse style guide. .e., comment start single # space. decoration (except outline entries) must added. Bad Good","code":"# If AVAL equals zero, set it to 0.0001. Otherwise, do not change it mutate(dataset, AVAL = if_else(AVAL == 0, 0.0001, AVAL)) # AVAL is to be displayed on a logarithmic scale. # Thus replace zeros by a small value to avoid gaps. mutate(dataset, AVAL = if_else(AVAL == 0, 0.0001, AVAL)) # Check arguments ---- # This is a comment # ########################### # This is another comment # ########################### #+++++++++++++++++++++++++++++++ # This is a section comment ---- #+++++++++++++++++++++++++++++++ # This is a comment # This is another comment # This is a section comment ----"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"input-checking","dir":"Articles","previous_headings":"Functions in R","what":"Input Checking","title":"Programming Strategy","text":"line fail-fast design principle, function inputs checked validity , ’s invalid input, function stop immediately error. exception case variable added function already exists input dataset: warning displayed function continue executing. Inputs checked using custom assertion functions defined R/assertions.R. custom assertion functions either return error case invalid input return nothing. common types input arguments like single variable, list variables, dataset, … functions checking available (see assertions). Arguments expect keywords handle case-insensitive manner, e.g., date_imputation = \"FIRST\" date_imputation = \"first\" accepted. assert_character_scalar() function helps handling arguments case-insensitive manner. argument checked outer function argument name inner function. rule applicable functions part admiral.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function-header-documentation","dir":"Articles","previous_headings":"Functions in R","what":"Function Header (Documentation)","title":"Programming Strategy","text":"Every function exported package must accompanying header formatted according roxygen2 convention. addition standard roxygen2 tags, @family @keywords tags also used. family/keywords used categorize function, used website internal package help pages. Please see section Categorization functions. example given : following fields mandatory: @param: One entry per function argument. following attributes described: expected data type (e.g. data.frame, logical, numeric etc.), permitted values (applicable), optionality (.e. required argument). expected input dataset required variables clearly stated. Describing default value becomes difficult maintain subject manual error already declared function arguments. description permitted values written separate line italicizing phrase “Permitted Values”, example : @details: natural-language description derivation used inside function. @keyword: One applicable tag function - identical family. @family: One applicable tag function - identical keyword. @return: description return value function. newly added variable(-s) mentioned . @examples: fully self-contained example use function. Self-contained means , code executed new R session, run without errors. means packages need loaded library() datasets needed either created directly inside example code loaded using data(). dataset created example, done using function tribble() (specify library(dplyr) calling function). functions called example, please specify library(pkg_name) refer respective function fun() opposed preferred pkg_name::fun() notation specified Unit Test Guidance. Make sure align columns ensures quick code readability. Copying descriptions avoided makes documentation hard maintain. example argument description used one function, argument described one function functions use @inheritParams . Please note @inheritParams func_first used header func_second() function, argument descriptions func_first() included documentation func_second() argument offered func_second() @param tag argument included header func_second(). order @param tags function definition. @inheritParams tags @param. affect order argument description rendered documentation makes easier maintain headers. Variable names, expressions, functions, code must enclosed backticks. render code. functions derive specific CDISC variable, title must state label variable without variable name. variable stated description.","code":"#' Derive Relative Day Variables #' #' Adds relative day variables (`--DY`) to the dataset, e.g., `ASTDY` and #' `AENDY`. #' #' @param dataset Input dataset #' #' The columns specified by the `reference_date` and the `source_vars` #' argument are expected. #' #' @param reference_date The start date column, e.g., date of first treatment #' #' A date or date-time object column is expected. #' #' Refer to `derive_var_dt()` to impute and derive a date from a date #' character vector to a date object. #' #' @param source_vars A list of datetime or date variables created using #' `exprs()` from which dates are to be extracted. This can either be a list of #' date(time) variables or named `--DY` variables and corresponding --DT(M) #' variables e.g. `exprs(TRTSDTM, ASTDTM, AENDT)` or `exprs(TRTSDT, ASTDTM, #' AENDT, DEATHDY = DTHDT)`. If the source variable does not end in --DT(M), a #' name for the resulting `--DY` variable must be provided. #' #' @details The relative day is derived as number of days from the reference #' date to the end date. If it is nonnegative, one is added. I.e., the #' relative day of the reference date is 1. Unless a name is explicitly #' specified, the name of the resulting relative day variable is generated #' from the source variable name by replacing DT (or DTM as appropriate) with #' DY. #' #' @return The input dataset with `--DY` corresponding to the `--DTM` or `--DT` #' source variable(s) added #' #' @keywords der_date_time #' @family der_date_time #' #' @export #' #' @examples #' library(lubridate) #' library(dplyr, warn.conflicts = FALSE) #' #' datain <- tribble( #' ~TRTSDTM, ~ASTDTM, ~AENDT, #' \"2014-01-17T23:59:59\", \"2014-01-18T13:09:O9\", \"2014-01-20\" #' ) %>% #' mutate( #' TRTSDTM = as_datetime(TRTSDTM), #' ASTDTM = as_datetime(ASTDTM), #' AENDT = ymd(AENDT) #' ) #' #' derive_vars_dy( #' datain, #' reference_date = TRTSDTM, #' source_vars = exprs(TRTSDTM, ASTDTM, AENDT) #' ) #' *Permitted Values*: example description of permitted values here"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"categorization-of-functions","dir":"Articles","previous_headings":"Functions in R","what":"Categorization of Functions","title":"Programming Strategy","text":"functions categorized keywords families within roxygen header. Categorization important admiral user-facing functions base totals 125 growing! However, ease burden developers, decided keywords families identical roxygen header, specified via @keywords @family fields. reiterate, function must use keyword family. Also, please note keywords families case-sensitive.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"keywords","dir":"Articles","previous_headings":"Functions in R > Categorization of Functions","what":"@keywords","title":"Programming Strategy","text":"keywords allows reference page easily organized using certain pgkdown functions. example, using function has_keyword(der_bds_gen) _pkgdown.yml file building website collect BDS General Derivation functions display alphabetical order Reference Page section called BDS-Specific.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"family","dir":"Articles","previous_headings":"Functions in R > Categorization of Functions","what":"@family","title":"Programming Strategy","text":"families allow similar functions displayed See Also section function’s documentation. example, user looking derive_vars_dy() function documentation might interested Date/Time functions. Using @family tag der_date_time display Date/Time functions available admiral user See Also section derive_vars_dy() function documentation. Please take look function documentation derive_vars_dy() see family tag action. list available keyword/family tags used admiral functions. think additional keyword/family tag added, please add issue GitHub discussion. NOTE: strongly encouraged @keyword @family identical. eases burden development maintenance admiral functions. need use multiple keywords families, please reach core development team discussion.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"missing-values","dir":"Articles","previous_headings":"","what":"Missing values","title":"Programming Strategy","text":"Missing values (NAs) need explicitly shown. Regarding character vectors converted SAS files: SAS treats missing character values blank. imported R empty strings (\"\") although nature missing values (NA). empty strings originate like need converted proper R missing values NA.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"file-structuring","dir":"Articles","previous_headings":"","what":"File Structuring","title":"Programming Strategy","text":"Organizing functions files art science. Thus, hard rules just recommendations. First foremost, two extremes avoided: putting function file putting functions single file. Apart following recommendations taken consideration deciding upon file structuring: function long (together documentation), store separate file functions documented together, put one file functions sort commonality relevance one another (like dplyr::bind_rows() dplyr::bind_cols()), put one file Store functions together helpers methods 1000 lines single file, unless necessary (exceptions , example, classes methods) responsibility author new function reviewer ensure recommendations put practice.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"r-package-dependencies","dir":"Articles","previous_headings":"","what":"R Package Dependencies","title":"Programming Strategy","text":"Package dependencies documented DESCRIPTION file. package used examples /unit tests listed Suggests, otherwise Imports. Functions packages explicitly imported using @importFrom tag R/admiral-package.R file. import if_else() mutate() function dplyr following line included file: #' @importFrom dplyr if_else mutate. using @importFrom tag, easier track dependencies one place improves code readability. functions become critically important using admiral included export. applies functions frequently called within {admiral }function calls like rlang::exprs(), dplyr::desc() pipe operator dplyr::%>%. export functions, following R code included R/reexports.R file using format:","code":"#' @export pkg_name::fun"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"metadata","dir":"Articles","previous_headings":"","what":"Metadata","title":"Programming Strategy","text":"Functions perform derivation logic add kind metadata, e.g. labels.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"unit-testing","dir":"Articles","previous_headings":"","what":"Unit Testing","title":"Programming Strategy","text":"function requires set unit tests verify produces expected result. See Writing Unit Tests {admiral} details.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"deprecation","dir":"Articles","previous_headings":"","what":"Deprecation","title":"Programming Strategy","text":"admiral still evolving, functions arguments may need removed replaced efficient options one release another. cases, relevant function argument must marked deprecated. deprecation done three phases release cycles. Phase 1: release identified function argument deprecated warning issued using function argument using deprecate_warn(). Phase 2: next release error thrown using deprecate_stop(). Phase 3: Finally 3rd release thereafter function removed package altogether. Information deprecation timelines must added warning/error message. Note deprecation cycle time function argument based current release schedule 6 months.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"documentation","dir":"Articles","previous_headings":"Deprecation","what":"Documentation","title":"Programming Strategy","text":"function argument removed, documentation must updated indicate function argument now deprecated new function/argument used instead. documentation updated : description level function, @keywords @family roxygen tags replaced deprecated @examples section removed. @param level argument.","code":"#' Title of the function #' #' @description #' `r lifecycle::badge(\"deprecated\")` #' #' This function is *deprecated*, please use `new_fun()` instead. #' . #' @family deprecated #' #' @keywords deprecated #' . @param old_param *Deprecated*, please use `new_param` instead."},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"handling-of-warning-and-error","dir":"Articles","previous_headings":"Deprecation","what":"Handling of Warning and Error","title":"Programming Strategy","text":"function argument deprecated, function must updated issue warning error using deprecate_warn() deprecate_stop(), respectively, described . test case added test file function checks whether warning/error issued appropriate using deprecated function argument.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"function","dir":"Articles","previous_headings":"Deprecation > Handling of Warning and Error","what":"Function","title":"Programming Strategy","text":"initial release function deprecated original function body must replaced call deprecate_warn() subsequently arguments passed new function. following release function body changed just include call deprecate_stop(). Finally, next release function removed package.","code":"fun_xxx <- function(dataset, some_param, other_param) { deprecate_warn(\"x.y.z\", \"fun_xxx()\", \"new_fun_xxx()\") new_fun_xxx( dataset = dataset, some_param = some_param, other_param = other_param ) } fun_xxx <- function(dataset, some_param, other_param) { deprecate_stop(\"x.y.z\", \"fun_xxx()\", \"new_fun_xxx()\") }"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"argument","dir":"Articles","previous_headings":"Deprecation > Handling of Warning and Error","what":"Argument","title":"Programming Strategy","text":"argument removed replaced, error must generated: argument renamed replaced, warning must issued new argument takes value old argument next release. Note: arguments passed exprs() argument (e.g. new_var = VAR1 filter = AVAL >10) need quoted.","code":"### BEGIN DEPRECATION if (!missing(old_param)) { deprecate_stop(\"x.y.z\", \"fun_xxx(old_param = )\", \"fun_xxx(new_param = )\") } ### END DEPRECATION ### BEGIN DEPRECATION if (!missing(old_param)) { deprecate_warn(\"x.y.z\", \"fun_xxx(old_param = )\", \"fun_xxx(new_param = )\") # old_param is given using exprs() new_param <- old_param # old_param is NOT given using exprs() new_param <- enexpr(old_param) } ### END DEPRECATION"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"unit-testing-1","dir":"Articles","previous_headings":"Deprecation","what":"Unit Testing","title":"Programming Strategy","text":"Unit tests deprecated functions arguments must added test file 1 function ensure warning error issued. writing unit test, check error warning right class, .e., \"lifecycle_error_deprecated\" \"lifecycle_warning_deprecated\", respectively. unit-test follow corresponding format, per unit test guidance.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"for-deprecated-functions-that-issues-a-warning-phase-1","dir":"Articles","previous_headings":"Deprecation > Unit Testing","what":"For Deprecated Functions that Issues a Warning (Phase 1)","title":"Programming Strategy","text":"unit test like following must added. existing unit tests call deprecated function need enclosed suppress_warning(). example, regexpr argument must specified ensure deprecation warning suppressed.","code":"## Test #: deprecation warning if function is called ---- test_that(\"derive_var_example() Test #: deprecation warning if function is called\", { expect_warning( derive_var_example(), class = \"lifecycle_warning_deprecated\" ) }) actual <- suppress_warning( derive_var_example(), regexpr = \"was deprecated\" )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"for-deprecated-functions-that-issues-an-error-phase-2","dir":"Articles","previous_headings":"Deprecation > Unit Testing","what":"For Deprecated Functions that Issues an Error (Phase 2)","title":"Programming Strategy","text":"unit test like following must added. unit tests deprecated function must removed.","code":"## Test #: error if function is called ---- test_that(\"derive_var_example() Test #: deprecation error if function is called\", { expect_error( derive_var_example(), class = \"lifecycle_error_deprecated\" ) })"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"best-practices-and-hints","dir":"Articles","previous_headings":"","what":"Best Practices and Hints","title":"Programming Strategy","text":"Please take following list recommendation try adhere rules possible. Arguments function calls named except first parameter (e.g. assert_data_frame(dataset, required_vars = exprs(var1, var2), optional = TRUE)). dplyr::if_else() used two conditions. Try always set missing argument whenever appropriate.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"how-quoting-is-used","dir":"Articles","previous_headings":"Best Practices and Hints","what":"How Quoting is used","title":"Programming Strategy","text":"admiral arguments require selecting one particular option like mode, e.g. mode = \"last\". Use quotation marks capture . expected assertion function corresponding arguments assert_character_scalar()/assert_character_vector(). Many admiral arguments require capturing expression, typically encased exprs() statement, evaluated later inside function body, see arguments like new_vars, e.g. new_vars = exprs(TRTSDTM = EXSTDTM). Oftentimes, assertion function corresponding assert_expr()/assert_expr_list(). arguments unquoted using !!!. admiral arguments like new_var filter expect single variable expression quoted call. function body, quoted using enexpr(). Usually combined assertion, e.g., new_var <- assert_symbol(enexpr(new_var)). arguments unquoted using !!. Keep mind !! one--one replacement !!! one--many replacement. Please see chapter Advanced R textbook details.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"standardizing-text-used-to-label-and-describe-arguments","dir":"Articles","previous_headings":"Best Practices and Hints","what":"Standardizing Text Used to Label and Describe Arguments","title":"Programming Strategy","text":"following PR, find example function argument dataset able standardized Label Description said function argument aligned across codebase. Please see changes file derive_adeg_params.R details. benefits programmatic way write documentation changes need made, making modification corresponding function, case, roxygen_param_dataset(), scales across codebase, can tested, less prone user-error typos grammar mistakes. functions implemented roxygen2.R naming convention argument follows roxygen_param_xxx(), “xxx” replaced argument name.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/programming_strategy.html","id":"r-and-package-versions-for-development","dir":"Articles","previous_headings":"","what":"R and Package Versions for Development","title":"Programming Strategy","text":"choice R Version set stone. However, common development environment important establish working across multiple companies multiple developers. currently work earliest three latest R Versions. need common development environment also carries choice package versions. GitHub allows us Actions/Workflows test admiral several versions R well several versions dependent R packages needed admiral. Currently test admiral three latest R Versions closest snapshots packages R versions. can view workflow others admiralci GitHub Repository. common development allows us easily re-create bugs provide solutions issues developers encounter. Reviewers Pull Requests running code know environment identical initiator Pull Request. ensures faster review times higher quality Pull Request reviews. achieve common development environment using lockfile created renv package. New developers encounter suggested renv::restore() console revert move forward R version package versions.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"common-r-cmd-check-issues","dir":"Articles","previous_headings":"","what":"Common R CMD Check Issues","title":"R CMD Issues","text":"R CMD check command line tool checks R packages standard set criteria. pull request pass check must issue notes, warnings errors. list common issues resolve .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"check-fails-only-on-one-version","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Check Fails Only on One Version","title":"R CMD Issues","text":"R CMD check workflow fails one two R versions can helpful reproduce testing environment locally. reproduce particular R version environment open admiral project corresponding R version, comment line source(\"renv/activate.R\") .Rprofile file, restart R session run following commands R console. ensure exact package versions use workflow installed hidden folder .library. way existing R packages overwritten.","code":"Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS = \"true\") if (!dir.exists(\".library\")) { dir.create(\".library\") } base_recommended_pkgs <- row.names(installed.packages(priority = \"high\")) for (pkg in base_recommended_pkgs) { path <- file.path(.Library, pkg) cmd <- sprintf(\"cp -r %s .library\", path) system(cmd) } assign(\".lib.loc\", \".library\", envir = environment(.libPaths)) r_version <- getRversion() if (grepl(\"^4.1\", r_version)) { options(repos = \"https://packagemanager.posit.co/cran/2021-05-03/\") } else if (grepl(\"^4.2\", r_version)) { options(repos = \"https://packagemanager.posit.co/cran/2022-01-03/\") } else if (grepl(\"^4.3\", r_version)) { options(repos = \"https://packagemanager.posit.co/cran/2023-04-20/\") } else { options(repos = \"https://cran.rstudio.com\") } if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_deps(dependencies = TRUE) remotes::install_github(\"pharmaverse/pharmaversesdtm\", ref = \"devel\") remotes::install_github(\"pharmaverse/admiraldev\", ref = \"devel\") rcmdcheck::rcmdcheck()"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"package-dependencies","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Package Dependencies","title":"R CMD Issues","text":"Add pkg Imports Suggests field DESCRIPTION file. general, dependencies listed Imports field. However, package used inside vignettes unit tests listed Suggests admiral functions work without “soft” dependencies installed.","code":"> checking package dependencies ... ERROR Namespace dependency not required: ‘pkg’"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"global-variables","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Global Variables","title":"R CMD Issues","text":"Add some_var list “global” variables R/globals.R.","code":"❯ checking R code for possible problems ... NOTE function_xyz: no visible binding for global variable ‘some_var’"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"undocumented-function-parameter","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Undocumented Function Parameter","title":"R CMD Issues","text":"Add @param some_param section header function_xyz() run devtools::document() afterwards.","code":"❯ checking Rd \\usage sections ... WARNING Undocumented arguments in documentation object 'function_xyz' ‘some_param’"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/rcmd_issues.html","id":"outdated-documentation","dir":"Articles","previous_headings":"Common R CMD Check Issues","what":"Outdated Documentation","title":"R CMD Issues","text":"name parameter changed function code yet header. Change @param old_param_name @param new_param_name run devtools::document(). reading recommend R-pkg manual r-cmd chapter","code":"❯ checking for code/documentation mismatches ... WARNING Codoc mismatches from documentation object 'function_xyz': ... Argument names in code not in docs: new_param_name Argument names in docs not in code: old_param_name Mismatches in argument names: Position: 6 Code: new_param_name Docs: old_param_name"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Release Strategy","text":"article explains package releases admiral across package extensions. includes details around planned/scheduled releases, well hotfixes.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"release-schedule","dir":"Articles","previous_headings":"","what":"Release Schedule","title":"Release Strategy","text":"release schedule maintained homepage.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"planning-releases","dir":"Articles","previous_headings":"","what":"Planning Releases","title":"Release Strategy","text":"past, whenever started looking towards future release, create new release issue label GitHub form release Q4-2022 prioritize issues. However, backlog minimal every issue considered Priority Issue. issue Priority, sent back Discussion Tab formed Priority issue. share advance users high level summary expected package updates via community meetings, especially anticipated breaking changes.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"package-release-process","dir":"Articles","previous_headings":"","what":"Package Release Process","title":"Release Strategy","text":"following important steps planned release hot fix release described. Depending package may helpful use usethis::use_release_issue() package-specific release_bullets() function.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"planned-release","dir":"Articles","previous_headings":"Package Release Process","what":"Planned Release","title":"Release Strategy","text":"package release done following steps: Create release version: Create new feature branch main. Call usethis::use_version() update Versions: field DESCRIPTION file update NEWS.md (replace “(development version)” version released) Create PR main merge . title PR must contain “[skip vbump]”. Otherwise, vbump workflow sets version development version CRAN reject submission. Bundle main (devtools::build(manual = TRUE)) send CRAN. See chapter R Packages details. CRAN asks modifications, repeat steps 1-2 necessary. package accepted available CRAN, use release button GitHub “release” package onto GitHub, select main branch target, use tag form vX.Y.Z, e.g., v1.1.2 (see past admiral releases reference Releasing Github section details). releases onto Github archives version code within main branch, attaches News/Changelog file, bundles code tar.gz file makes validation report via GitHub action validation insightsengineering/validatoR. also builds website released version stores new vx.y.z folder gh-pages branch. Merge main patch prepared case needed hotfix. Create next development version: Create new feature branch main. Call usethis::use_dev_version() update NEWS.md (adds new section # admiral (development version)) update version DESCRIPTION file development version. Create PR main merge .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"hot-fix-release","dir":"Articles","previous_headings":"Package Release Process","what":"Hot Fix Release","title":"Release Strategy","text":"Rarely, may need release hot fix immediately address bug. majority cases, -cycle release can made directly main branch, bug fixes new features released earlier planned, thus avoiding patch branch release. hot fix release done following steps: Identify bugs need fixed hot fix release label “hotfix” label. Branches addressing bugs Pull Requests merged single patch branch main branch, patch branch created recent release package. , run following git commands: git checkout -b patch vX.Y.Z git push -u origin patch need use development versions. .e., first pull request set version DESCRIPTION version released corresponding heading added NEWS.md. naming branch follow naming conventions guide. PRs hot fix merged (patch), bundle patch (devtools::build(manual = TRUE)) send CRAN. See chapter R Packages details. CRAN asks modifications, repeat steps 1-4 necessary. package accepted available CRAN, , use release button GitHub “release” package onto GitHub, select patch branch target, use tag form vX.Y.Z, e.g., v1.1.2 (see past admiral releases reference Releasing Github section details). releases onto Github archives version code within patch branch, attaches News/Changelog file, bundles code tar.gz file makes validation report via GitHub action validation insightsengineering/validatoR. also builds website released version stores new vx.y.z folder gh-pages branch. hot fixes merged main branch additional Pull Request. Merging PR update version DESCRIPTION file development version. Create next development version: Create new feature branch main. Update NEWS.md (add new section # admiral (development version)) Create PR main merge .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"releasing-to-github","dir":"Articles","previous_headings":"","what":"Releasing to Github","title":"Release Strategy","text":"Releases section main repo, select Draft New Release. Proceed creating appropriate release tag header, denoted vX.X.X admiral X.X.X respectively, release: Copy contents NEWS.md section release, paste release notes section: upload box says, “Attach binaries dropping selecting ” upload appropriate admiral_X.X.X.tar.gz file available download CRAN website. Click Publish Release ’re done! NB: Occasionally, might need delete tag something done error. Deleting tag can done GitHub must done terminal. However, easy!! Just use: git push --delete origin tagname","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"release-tracking","dir":"Articles","previous_headings":"","what":"Release Tracking","title":"Release Strategy","text":"new package release submitted CRAN awaiting go-live, can track status searching within dashboard.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/release_strategy.html","id":"communications","dir":"Articles","previous_headings":"","what":"Communications","title":"Release Strategy","text":"release, raise awareness via Slack channel LinkedIn.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"unit-tests-become-a-safety-net-for-developers","dir":"Articles","previous_headings":"Why Write Unit Tests?","what":"Unit Tests Become a Safety Net for Developers","title":"Unit Test Guidance","text":"comprehensive suite unit tests can act safety net developers. frequently running tests, can assure recent modifications code haven’t broken anything. words, unit tests help prevent regressions.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"unit-tests-can-contribute-to-higher-code-quality","dir":"Articles","previous_headings":"Why Write Unit Tests?","what":"Unit Tests Can Contribute to Higher Code Quality","title":"Unit Test Guidance","text":"Since unit tests act safety net, developers become confident changing code. can refactor code without fear breaking things, driving general quality code base .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"unit-tests-can-contribute-to-better-application-architecture","dir":"Articles","previous_headings":"Why Write Unit Tests?","what":"Unit Tests Can Contribute to Better Application Architecture","title":"Unit Test Guidance","text":"can add unit tests easily code base, ’s usually good sign regarding quality app’s architecture. , drive write testable code can incentive better architecture.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"detects-code-smells-in-your-codebase","dir":"Articles","previous_headings":"Why Write Unit Tests?","what":"Detects Code Smells in your Codebase","title":"Unit Test Guidance","text":"ease adding unit tests code base good sign, opposite also true. hard time creating unit tests given piece code might sign code smells code—e.g. functions complex.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"tests-should-be-fast","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Tests Should Be Fast","title":"Unit Test Guidance","text":"’re slow, developers won’t run often . defeats whole purpose suite unit tests first place, boost developers’ confidence make changes code. tests can’t work safety net ’re run often.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"tests-should-be-simple","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Tests Should Be Simple","title":"Unit Test Guidance","text":"several techniques can apply high degree confidence correctness tests. One keep tests low cyclomatic complexity. Cyclomatic complexity code metric indicates number possible execution paths given method can follow. piece code lower complexity easier understand maintain, means developers less likely introduce bugs working . can measure cyclomatic complexity tests (using, instance, linter tool) best keep low.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"test-shouldnt-duplicate-implementation-logic","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Test Shouldn’t Duplicate Implementation Logic","title":"Unit Test Guidance","text":"person wrote test implementation, ’s possible made errors places. Since tests mirror implementation, might still pass, implementation wrong, tests might fool thinking otherwise. Resist urge make tests fancy, keep simple, testing suite better .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"tests-should-be-readable","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Tests Should Be Readable","title":"Unit Test Guidance","text":"best practice overlaps little bit one keeping tests simple. tests hard read, developers likely misunderstand introduce bugs. Test cases used form documentation, obviously need readable.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"running-unit-tests-part-of-the-build-process","dir":"Articles","previous_headings":"Writing Good Unit Tests","what":"Running Unit Tests Part of the Build Process","title":"Unit Test Guidance","text":"Automate whole process running unit tests taking action fail. build process execute unit tests mark build broken tests fail.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"plan-your-unit-tests","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Plan your Unit Tests","title":"Unit Test Guidance","text":"Start considering derivation rule testing possible arguments/flexibilities function code. plan scenarios test. can either involve generating different input test cases feeding different calls function.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"test-coverage","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Test coverage","title":"Unit Test Guidance","text":"Unit tests cover functionality function. another function g() called within function f(), unit tests f() test functionality g(). tested unit tests g(), .e. unit tests added lowest level.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"tests-should-be-robust-to-cover-realistic-data-scenarios","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Tests Should be Robust to Cover Realistic Data Scenarios","title":"Unit Test Guidance","text":"generating input test cases, can helpful consider regular cases (expected common data scenarios), boundary cases (data points close equal), special cases (uncommon valid data scenarios, e.g. missing special characters). Although never cover every single eventuality possible input data (reliability testing method ever gives 100% certainty), need give confidence code robust enough work across data scenarios.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"testing-should-cover-possible-arguments","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Testing Should Cover Possible Arguments","title":"Unit Test Guidance","text":"different calls function, consider user might apply function test variety possible calls, whilst still remembering tips tests fast simple. needed cases complexity level flexibility function justifies , e.g. see test script: https://github.com/pharmaverse/admiral/blob/main/tests/testthat/test-derive_var_extreme_flag.R.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"exported-functions","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Exported Functions","title":"Unit Test Guidance","text":"Don’t forget add unit test exported function.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"snapshot-testing","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Snapshot Testing","title":"Unit Test Guidance","text":"Standard unit tests always convenient record expected behavior code. challenges include: Output large, making painful define reference output, bloating size test file making hard navigate. Text output includes many characters like quotes newlines require special handling string. Binary formats like plots images, difficult describe code: .e. plot looks right, error message useful human, print method uses color effectively. situations, testthat provides alternative mechanism: snapshot tests. Snapshot tests record results separate human readable file records results, including output, messages, warnings, errors. Review {testthat} snapshot vignette details.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"set-up-the-test-script","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Set up the Test Script","title":"Unit Test Guidance","text":"Within tests/testthat folder project, add script naming convention test-.R., unit test script can created console also, follows: testing framework used testthat following format : example, testing function called my_new_func contained script all_funcs.R console use: Open newly created file test-all_funcs.R use following format: Note: comparing datasets admiral use function expect_dfs_equal(). input expected output unit tests must follow following rules: Input output simple possible. Values hard-coded whenever possible. values need derived, unit tested functions can used. contrast Programming Strategy documentation function examples, test files include library(pkg_name) calls. dataset needs created testing purposes, done using function tribble() tibble package following command dplyr::tribble(). Furthermore, functions need called, also done using pkg_name::fun()notation. Make sure align columns well. ensures quick code readability. Ensure give meaningful explanation test testthat call, compiled package validation report. name function test ID included title also help traceability. comments ending ---- create entries TOC RStudio.","code":"usethis::use_test(\"\") ## Test 1: ---- test_that(\" Test 1: \", { input <- dplyr::tribble( ~inputvar1, ~inputvar2, ... ... ) expected_output <- mutate(input, outputvar = c()) expect_dfs_equal((input), expected_output) }) usethis::use_test(\"all_funcs\") # my_new_func ---- ## Test 1: ---- test_that(\"my_new_func Test 1: \", { input <- dplyr::tribble( ~inputvar1, ~inputvar2, ... ... ) expected_output <- mutate(input, outputvar = c()) expect_dfs_equal((input), expected_output) })"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"addin-pharmaverse4devsformat_test_that_file","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Addin pharmaverse4devs::format_test_that_file()","title":"Unit Test Guidance","text":"ease burden developers writing adding tests developed Addin formatting test_that test files according admiral programming standards. Addin add update comments well number re-numbers tests. access Addin, sure install {pharmaverse4devs} Github. install latest development version package directly GitHub use following code: use Addin button select “Format test_that test file” seen image. sure test-file open selected calling Addin. Addin perform following: Updates adds number tests comments test_that() call Updates comments based description provided test_that() call Updates function name test_that() call. function name extracted last # ---- comment test_that() call. test file tests one function, comments added first test function. test files tests single function , comments can omitted. case addin determines function name file name stripping “test-” prefix “.R” suffix. writing new unit tests, just provide description test_that() call necessary function name # ---- comment: Call addin get: tested unit test program, can run unit tests console, follows. running just tests current file call","code":"if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_github(\"pharmaverse/pharmaverse4devs\") # derive_vars_merged ---- test_that( \"works if it merges all variables\", { actual <- derive_vars_merged(advs, dataset_add = adsl, by_vars = exprs(STUDYID, USUBJID) ) # convert_dtm_to_dtc ---- test_that(\"works if dtm is in correct format\", { expect_equal( convert_dtm_to_dtc(as.POSIXct(\"2022-04-05 15:34:07 UTC\")), \"2022-04-05T15:34:07\" ) }) test_that(\"Error is thrown if dtm is not in correct format\", { expect_error( convert_dtm_to_dtc(\"2022-04-05T15:26:14\"), \"lubridate::is.instant(dtm) is not TRUE\", fixed = TRUE ) }) # derive_vars_merged ---- ## Test 1: derive_vars_merged ---- test_that( \"derive_vars_merged Test 1: it merges all variables\", { actual <- derive_vars_merged(advs, dataset_add = adsl, by_vars = exprs(STUDYID, USUBJID) ) # convert_dtm_to_dtc ---- ## Test 2: works if dtm is in correct format ---- test_that(\"convert_dtm_to_dtc Test 2: works if dtm is in correct format\", { expect_equal( convert_dtm_to_dtc(as.POSIXct(\"2022-04-05 15:34:07 UTC\")), \"2022-04-05T15:34:07\" ) }) ## Test 3: Error is thrown if dtm is not in correct format ---- test_that(\"convert_dtm_to_dtc Test 3: Error is thrown if dtm is not in correct format\", { expect_error( convert_dtm_to_dtc(\"2022-04-05T15:26:14\"), \"lubridate::is.instant(dtm) is not TRUE\", fixed = TRUE ) }) devtools::test() devtools::test_file()"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/unit_test_guidance.html","id":"automation-of-unit-tests","dir":"Articles","previous_headings":"Writing Unit Tests in {admiral}","what":"Automation of Unit Tests","title":"Unit Test Guidance","text":"user actions pull request {admiral} GitHub repo, unit tests automatically run pull request denied unit tests fail.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Writing Vignettes","text":"guidance ensures consistency across vignettes admiral package terms content, structure code execution. general rule, vignette workflow defined r-pkgs.org followed.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"metadata","dir":"Articles","previous_headings":"","what":"Metadata","title":"Writing Vignettes","text":"vignette admiral start following metadata. vignette meaningful.","code":"--- title: \"\" output: rmarkdown::html_vignette: vignette: > %\\VignetteIndexEntry{} %\\VignetteEngine{knitr::rmarkdown} ---"},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"default-options","dir":"Articles","previous_headings":"Markdown","what":"Default Options","title":"Writing Vignettes","text":"chunks used within vignette, following options set metadata ensure chunks rendered consistently across vignettes.","code":"```{r setup, include=FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = \"#>\" ) ```"},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"table-of-contents","dir":"Articles","previous_headings":"Markdown > Format Sections","what":"Table of Contents","title":"Writing Vignettes","text":"Headings must title case start Heading 1: first section gives brief introduction vignette. last sub-section introduction describe packages required run admiral functions. admiral package described first. warning=FALSE message=FALSE options prevent usual messages: Attaching package: ‘xxxx’following objects masked ‘package:yyyyy’ fun1, fun2","code":"# Heading 1 This is the description of my first section. ## Heading 1.1 This is the description of my first sub-section within my first section. ## Heading 1.2 This is the description of my second sub-section within my first section. # Introduction This is the introduction of my vignette. ## Required Packages ```{r, warning=FALSE, message=FALSE} library(admiral) # ```"},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"general-conventions","dir":"Articles","previous_headings":"Markdown > Format Sections > Conventions","what":"General Conventions","title":"Writing Vignettes","text":"new vignette must added _pkgdown.yml file relevant section. variable name, dataset name, function, argument name must quoted backticks: e.g. Functions must also end (). Variables datasets name expected uppercase. codes must described, executed output result displayed code executed. Use: output created must clearly show function derived. least show variables/records used input function derived variables/records. dataset must displayed, formatted using dataset_vignette() function displayed consistently across vignettes.E.g. Description execution code used derive variable/record Output dataset formatted using dataset_vignette()… Note: call get formatted dataset : Displaying many big datasets vignette, may require long time load page may cause messages browser page responsive. case number displayed observations restricted either restricting source datasets beginning vignette call dataset_vignette() calls affected.","code":"The `date` parameter of the `derive_my_var()` function expects a date variable, e.g., `ADT`. ```{r} # ``` vs1 <- vs %>% derive_vars_dt( new_vars_prefix = \"A\", dtc = VSDTC, date_imputation = \"first\" ) ```r dataset_vignette( vs1, display_vars = exprs(USUBJID, VSTESTCD, VISIT, VSDTC, ADT), filter = VSTESTCD == \"WEIGHT\" ) ```"},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"using-footnotes","dir":"Articles","previous_headings":"Markdown > Format Sections > Conventions","what":"Using Footnotes","title":"Writing Vignettes","text":"Footnotes can useful add context without adding clutter primary subject matter vignette written. use footnotes, add caret identifier inside brackets e.g. ([^1]). identifiers can numbers words, can’t contain spaces tabs. following markdown text render follows: example 1","code":"Here is an example [^1] [^1]: Cool note about the example."},{"path":"https://pharmaverse.github.io/admiraldev/dev/articles/writing_vignettes.html","id":"conventions-for-adam-workflow","dir":"Articles","previous_headings":"Markdown > Format Sections > Conventions","what":"Conventions for ADaM Workflow","title":"Writing Vignettes","text":"vignettes describing ADaM workflow, second section summarize programming workflow. first sub-section within workflow always describe data read demonstrate use admiral functions, sub-section within programming workflow tagged (e.g. [Step1] (#step)), user can go relevant section programming workflow (addition Table contents). Don’t use tag number use meaningful name (e.g. use (#link1), use (#this_action)) last section link template script. ADSL variables ADSL variables required derivation merged SDTM dataset first derivation. ADSL variables added -variables derivations add observations. ensures ADSL variables populated new observations. adsl_vars variable created beginning script added by_vars parameter derivations add observations. ADSL variables final dataset required derivation merged dataset last derivation.","code":"# Programming Workflow * [Read in Data](#readdata) * [Derive/Impute End and Start Analysis Date/time and Relative Day](#datetime) * ... * [Assign `ASEQ`](#aseq) ## Read in Data {#readdata} ## Derive/Impute End and Start Analysis Date/time and Relative Day {#datetime} ## ... ## Assign `ASEQ` {#aseq} # Another Section # Example Script ADaM | Sample Code ---- | -------------- ADxx | [ad_adxx.R](https://github.com/pharmaverse/admiral/blob/main/inst/templates/ad_adxx.R){target=\"_blank\"}"},{"path":"https://pharmaverse.github.io/admiraldev/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"define authors actively maintaining code base, contributors made significant contribution past. Ben Straub. Author, maintainer. Stefan Bundfuss. Author. Jeffrey Dickinson. Author. Ross Farrugia. Author. Pooja Kumari. Author. Edoardo Mancini. Author. Sadchla Mascary. Author. Zelos Zhu. Author. Ania Golab. Contributor. Samia Kabi. Contributor. Syed Mubasheer. Contributor. Thomas Neitmann. Contributor. Ondrej Slama. Contributor. F. Hoffmann-La Roche AG. Copyright holder, funder. GlaxoSmithKline LLC. Copyright holder, funder.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Straub B, Bundfuss S, Dickinson J, Farrugia R, Kumari P, Mancini E, Mascary S, Zhu Z (2024). admiraldev: Utility Functions Development Tools Admiral Package Family. R package version 1.0.0.9026, https://github.com/pharmaverse/admiraldev/, https://pharmaverse.github.io/admiraldev/.","code":"@Manual{, title = {admiraldev: Utility Functions and Development Tools for the Admiral Package Family}, author = {Ben Straub and Stefan Bundfuss and Jeffrey Dickinson and Ross Farrugia and Pooja Kumari and Edoardo Mancini and Sadchla Mascary and Zelos Zhu}, year = {2024}, note = {R package version 1.0.0.9026, https://github.com/pharmaverse/admiraldev/}, url = {https://pharmaverse.github.io/admiraldev/}, }"},{"path":"https://pharmaverse.github.io/admiraldev/dev/index.html","id":"admiraldev-","dir":"","previous_headings":"","what":"Utility Functions and Development Tools for the Admiral Package Family","title":"Utility Functions and Development Tools for the Admiral Package Family","text":"Utility Functions Development Tools Admiral Package Family","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/index.html","id":"purpose","dir":"","previous_headings":"","what":"Purpose","title":"Utility Functions and Development Tools for the Admiral Package Family","text":"Functions, tools documentation developing core admiral extension package functions. functions admiraldev around testing inputs going functions. also additional quality life functions/Addins assist developers admiral admiral extension packages, functions help rendering documentation, Developer Guides developing function using GitHub, GitHub Actions. NOTE: package intended standalone use rather central dependency admiral extension packages","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Utility Functions and Development Tools for the Admiral Package Family","text":"package available CRAN can installed running install.packages(\"admiraldev\"). install latest development version package directly GitHub use following code:","code":"if (!requireNamespace(\"remotes\", quietly = TRUE)) { install.packages(\"remotes\") } remotes::install_github(\"pharmaverse/admiraldev\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/index.html","id":"release-schedule","dir":"","previous_headings":"","what":"Release Schedule","title":"Utility Functions and Development Tools for the Admiral Package Family","text":"admiraldev released CRAN time official release admiral. can find release schedule admiral packages .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"Add suffix variables list expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"","code":"add_suffix_to_vars(order, vars, suffix)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"order List expressions Permitted Values: list variables desc() function calls created exprs(), e.g., exprs(ADT, desc(AVAL)) vars Variables change Permitted Values: list variables created exprs() suffix Suffix Permitted Values: character scalar","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"list expression element suffix (suffix) added every symbol specified vars","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/add_suffix_to_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add a Suffix to Variables in a List of Expressions — add_suffix_to_vars","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) add_suffix_to_vars(exprs(ADT, desc(AVAL), AVALC), vars = exprs(AVAL), suffix = \".join\") #> [[1]] #> ADT #> #> [[2]] #> desc(AVAL.join) #> #> [[3]] #> AVALC #>"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/admiraldev-package.html","id":null,"dir":"Reference","previous_headings":"","what":"admiraldev: Utility Functions and Development Tools for the Admiral Package Family — admiraldev-package","title":"admiraldev: Utility Functions and Development Tools for the Admiral Package Family — admiraldev-package","text":"Utility functions check data, variables conditions functions used 'admiral' 'admiral' extension packages. Additional utility helper functions assist developers maintaining documentation, testing general upkeep 'admiral' 'admiral' extension packages.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/admiraldev-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"admiraldev: Utility Functions and Development Tools for the Admiral Package Family — admiraldev-package","text":"Maintainer: Ben Straub ben.x.straub@gsk.com Authors: Stefan Bundfuss Jeffrey Dickinson Ross Farrugia Pooja Kumari Edoardo Mancini Sadchla Mascary Zelos Zhu contributors: Ania Golab [contributor] Samia Kabi [contributor] Syed Mubasheer [contributor] Thomas Neitmann [contributor] Ondrej Slama [contributor] F. Hoffmann-La Roche AG [copyright holder, funder] GlaxoSmithKline LLC [copyright holder, funder]","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/arg_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Argument Name from an Expression — arg_name","title":"Extract Argument Name from an Expression — arg_name","text":"Extract Argument Name Expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/arg_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Argument Name from an Expression — arg_name","text":"","code":"arg_name(expr)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/arg_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Argument Name from an Expression — arg_name","text":"expr expression created inside function using substitute()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/arg_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Argument Name from an Expression — arg_name","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument an Atomic Vector? — assert_atomic_vector","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"Checks argument atomic vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"","code":"assert_atomic_vector( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_atomic_vector\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"function throws error arg atomic vector. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_atomic_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument an Atomic Vector? — assert_atomic_vector","text":"","code":"example_fun <- function(x) { assert_atomic_vector(x) } example_fun(1:10) try(example_fun(list(1, 2))) #> Error in example_fun(list(1, 2)) : #> Argument `x` must be an atomic vector, but is a list."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Character Scalar (String)? — assert_character_scalar","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"Checks argument character scalar (optionally) whether matches one provided values.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"","code":"assert_character_scalar( arg, values = NULL, case_sensitive = TRUE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_character_scalar\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"arg function argument checked values character vector valid values arg. Values converted lower case vector case_sensitive = FALSE used. case_sensitive argument handled case-sensitive? set FALSE, argument converted lower case checking permitted values returning argument. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"function throws error arg character vector arg character vector length > 1 value one values specified. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_scalar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Character Scalar (String)? — assert_character_scalar","text":"","code":"example_fun <- function(msg_type) { assert_character_scalar(msg_type, values = c(\"warning\", \"error\")) } example_fun(\"warning\") try(example_fun(\"message\")) #> Error in example_fun(\"message\") : #> Argument `msg_type` must be equal to one of \"warning\" or \"error\". try(example_fun(TRUE)) #> Error in example_fun(TRUE) : #> Argument `msg_type` must be a scalar of class , but is #> `TRUE`. # handling arguments case-insensitive example_fun2 <- function(msg_type) { msg_type <- assert_character_scalar( msg_type, values = c(\"warning\", \"error\"), case_sensitive = FALSE ) if (msg_type == \"warning\") { print(\"A warning was requested.\") } } example_fun2(\"Warning\") #> [1] \"A warning was requested.\""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Character Vector? — assert_character_vector","title":"Is an Argument a Character Vector? — assert_character_vector","text":"Checks argument character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Character Vector? — assert_character_vector","text":"","code":"assert_character_vector( arg, values = NULL, named = FALSE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_character_vector\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Character Vector? — assert_character_vector","text":"arg function argument checked values character vector valid values arg named set TRUE, error issued elements vector named. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Character Vector? — assert_character_vector","text":"function throws error arg character vector element included list valid values. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_character_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Character Vector? — assert_character_vector","text":"","code":"example_fun <- function(chr) { assert_character_vector(chr) } example_fun(letters) try(example_fun(1:10)) #> Error in example_fun(1:10) : #> Argument `chr` must be , but is an integer vector. example_fun2 <- function(chr) { assert_character_vector(chr, named = TRUE) } try(example_fun2(c(alpha = \"a\", \"b\", gamma = \"c\"))) #> Error in example_fun2(c(alpha = \"a\", \"b\", gamma = \"c\")) : #> All elements of `chr` argument must be named. #> ℹ The indices of the unnamed elements are 2"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Data Frame? — assert_data_frame","title":"Is an Argument a Data Frame? — assert_data_frame","text":"Checks argument data frame (optionally) whether contains set required variables","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Data Frame? — assert_data_frame","text":"","code":"assert_data_frame( arg, required_vars = NULL, check_is_grouped = TRUE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_data_frame\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Data Frame? — assert_data_frame","text":"arg function argument checked required_vars list variables created using exprs() check_is_grouped Throw error dataset grouped? Defaults TRUE. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Data Frame? — assert_data_frame","text":"function throws error arg data frame arg data frame misses variable specified required_vars. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_data_frame.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Data Frame? — assert_data_frame","text":"","code":"library(dplyr) library(rlang) dm <- tribble( ~STUDYID, ~USUBJID, \"XYZ\", \"1\", \"XYZ\", \"2\" ) example_fun <- function(dataset) { assert_data_frame(dataset, required_vars = exprs(STUDYID, USUBJID)) } example_fun(dm) try(example_fun(select(dm, -STUDYID))) #> Error in example_fun(select(dm, -STUDYID)) : #> Required variable `STUDYID` is missing in `dataset` try(example_fun(\"Not a dataset\")) #> Error in example_fun(\"Not a dataset\") : #> Argument `dataset` must be class , but is a string. try(example_fun(group_by(dm, USUBJID))) #> Error in example_fun(group_by(dm, USUBJID)) : #> Argument `dataset` must not be a grouped dataset, please `ungroup()` it."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":null,"dir":"Reference","previous_headings":"","what":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"Checks variable dataset date datetime variable","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"","code":"assert_date_var( dataset, var, dataset_name = rlang::caller_arg(dataset), var_name = rlang::caller_arg(var), message = NULL, class = \"assert_date_var\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"dataset dataset variable expected var variable check dataset_name name dataset. argument specified, specified name displayed error message. var_name name variable. argument specified, specified name displayed error message. message (string) string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"var_name\" \"dataset_name\", can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"function throws error var date datetime variable dataset returns input invisibly otherwise.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_var.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is a Variable in a Dataset a Date or Datetime Variable? — assert_date_var","text":"","code":"library(lubridate) #> #> Attaching package: ‘lubridate’ #> The following objects are masked from ‘package:base’: #> #> date, intersect, setdiff, union library(dplyr) library(rlang) example_fun <- function(dataset, var) { var <- assert_symbol(enexpr(var)) assert_date_var(dataset = dataset, var = !!var) } my_data <- tribble( ~USUBJID, ~ADT, \"1\", ymd(\"2020-12-06\"), \"2\", ymd(\"\") ) example_fun( dataset = my_data, var = ADT ) try(example_fun( dataset = my_data, var = USUBJID )) #> Error in example_fun(dataset = my_data, var = USUBJID) : #> Column \"USUBJID\" in dataset `dataset` must be a date or datetime, but is #> a character vector. example_fun2 <- function(dataset, var) { var <- assert_symbol(enexpr(var)) assert_date_var( dataset = dataset, var = !!var, dataset_name = \"your_data\", var_name = \"your_var\" ) } try(example_fun2( dataset = my_data, var = USUBJID )) #> Error in example_fun2(dataset = my_data, var = USUBJID) : #> Column \"your_var\" in dataset `your_data` must be a date or datetime, but #> is a character vector."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an object a date or datetime vector? — assert_date_vector","title":"Is an object a date or datetime vector? — assert_date_vector","text":"Check object/vector date datetime variable without needing dataset input","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an object a date or datetime vector? — assert_date_vector","text":"","code":"assert_date_vector( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_date_vector\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an object a date or datetime vector? — assert_date_vector","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL function assert_date_vector exits early throw error. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an object a date or datetime vector? — assert_date_vector","text":"function returns error arg missing, date datetime variable otherwise returns invisible output.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_date_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an object a date or datetime vector? — assert_date_vector","text":"","code":"example_fun <- function(arg) { assert_date_vector(arg) } example_fun( as.Date(\"2022-01-30\", tz = \"UTC\") ) try(example_fun(\"1993-07-14\")) #> Error in example_fun(\"1993-07-14\") : #> Argument `arg` must be a date or datetime, but is a string."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert Argument is an Expression — assert_expr","title":"Assert Argument is an Expression — assert_expr","text":"Assert Argument Expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert Argument is an Expression — assert_expr","text":"","code":"assert_expr( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_expr\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert Argument is an Expression — assert_expr","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assert Argument is an Expression — assert_expr","text":"function throws error arg expression, .e. either symbol call, returns input invisibly otherwise","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a List of Expressions? — assert_expr_list","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"Checks argument list expressions.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"","code":"assert_expr_list( arg, required_elements = NULL, named = FALSE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_expr_list\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"arg function argument checked required_elements character vector names must present arg named set TRUE, error issued elements list named. optional checked argument optional? set FALSE arg NULL error thrown. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"function throws error arg list expressions. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_expr_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a List of Expressions? — assert_expr_list","text":"","code":"library(rlang) example_fun <- function(vars) { assert_expr_list(vars) } example_fun(exprs(DTHDOM = \"AE\", DTHSEQ = AESEQ)) try(example_fun(exprs(\"AE\", DTSEQ = AESEQ, !!list(\"a\"), !!list(\"a\")))) #> Error in example_fun(exprs(\"AE\", DTSEQ = AESEQ, !!list(\"a\"), !!list(\"a\"))) : #> All elements of `vars` must be an expression. #> ℹ `vars[[3]]` = `list(\"a\")` is of type , and `vars[[4]]` = `list(\"a\")` is #> of type "},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Filter Condition? — assert_filter_cond","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"Argument Filter Condition?","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"","code":"assert_filter_cond( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_filter_cond\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"arg Quosure - filtering condition. optional Logical - argument optional? Defaults FALSE. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"Performs necessary checks returns arg pass. Otherwise throws informative error.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"Check arg suitable filtering condition used functions like subset dplyr::filter.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_filter_cond.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Filter Condition? — assert_filter_cond","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) dm <- dplyr::tribble( ~DOMAIN, ~STUDYID, ~USUBJID, ~AGE, \"DM\", \"STUDY X\", \"01-701-1015\", 64, \"DM\", \"STUDY X\", \"01-701-1016\", 65, ) # typical usage in a function as an argument check example_fun <- function(dat, x) { x <- assert_filter_cond(enexpr(x), arg_name = \"x\") filter(dat, !!x) } example_fun(dm, AGE == 64) #> # A tibble: 1 × 4 #> DOMAIN STUDYID USUBJID AGE #> #> 1 DM STUDY X 01-701-1015 64 try(assert_filter_cond(mtcars)) #> Error in eval(expr, envir, enclos) : #> Argument `mtcars` must be a filter condition, but is a data frame"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Is Argument a Function? — assert_function","title":"Is Argument a Function? — assert_function","text":"Checks argument function expected arguments provided function.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is Argument a Function? — assert_function","text":"","code":"assert_function( arg, params = NULL, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_function\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is Argument a Function? — assert_function","text":"arg function function checked params character vector character vector expected argument names aforementioned function arg. ellipsis, ..., included function formals function arg, argument, params ignored, accepting values character vector. optional checked argument optional? set FALSE arg NULL error thrown. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is Argument a Function? — assert_function","text":"function throws error argument function function provide arguments specified params argument (assuming ellipsis function formals)","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is Argument a Function? — assert_function","text":"","code":"example_fun <- function(fun) { assert_function(fun, params = c(\"x\")) } example_fun(mean) try(example_fun(1)) #> Error in example_fun(1) : #> Argument `fun` must be a function, but is a number. try(example_fun(sum)) #> Error in example_fun(sum) : #> \"x\" is not an argument of the function specified for `fun`."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function_param.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert Argument is a Parameter of a Function — assert_function_param","title":"Assert Argument is a Parameter of a Function — assert_function_param","text":"function deprecated, please use assert_function() instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function_param.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert Argument is a Parameter of a Function — assert_function_param","text":"","code":"assert_function_param(arg, params)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function_param.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert Argument is a Parameter of a Function — assert_function_param","text":"arg name function passed string params character vector function parameters","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_function_param.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assert Argument is a Parameter of a Function — assert_function_param","text":"function throws error elements params argument function given arg","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Does a Dataset Contain All Required Variables? — assert_has_variables","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"function deprecated, please use assert_data_frame() instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"","code":"assert_has_variables(dataset, required_vars)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"dataset data.frame required_vars character vector variable names","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"function throws error required variables missing input dataset. Otherwise, dataset returned invisibly.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_has_variables.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Does a Dataset Contain All Required Variables? — assert_has_variables","text":"Checks dataset contains required variables","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument an Integer Scalar? — assert_integer_scalar","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"Checks argument integer scalar","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"","code":"assert_integer_scalar( arg, subset = \"none\", optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_integer_scalar\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"arg function argument checked subset subset integers arg part . one \"none\" (default), \"positive\", \"non-negative\" \"negative\". optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"function throws error arg integer belonging specified subset. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_integer_scalar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument an Integer Scalar? — assert_integer_scalar","text":"","code":"example_fun <- function(num1, num2) { assert_integer_scalar(num1, subset = \"positive\") assert_integer_scalar(num2, subset = \"negative\") } example_fun(1, -9) try(example_fun(1.5, -9)) #> Error in example_fun(1.5, -9) : #> Argument `num1` must be a positive integer scalar. try(example_fun(2, 0)) #> Error in example_fun(2, 0) : #> Argument `num2` must be a negative integer scalar. try(example_fun(\"2\", 0)) #> Error in example_fun(\"2\", 0) : #> Argument `num1` must be a positive integer scalar."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_element.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","title":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","text":"Checks elements list named lists/classes fulfill certain condition. , error issued elements list fulfilling condition listed.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","text":"","code":"assert_list_element( list, element, condition, message_text, arg_name = rlang::caller_arg(list), message = NULL, class = \"assert_list_element\", call = parent.frame(), ... )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","text":"list list checked list named lists classes expected. element name element lists/classes character scalar expected. condition Condition fulfilled condition evaluated element list. element lists/classes can referred name, e.g., censor == 0 check censor field class. message_text Text displayed error message listing values meet condition. text describe condition fulfilled, e.g., \"Error {arg_name}: censor values must zero.\". message argument specified, text displayed message_text ignored. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages. ... Objects required evaluate condition condition contains objects apart element, passed function. See second example .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_element.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Element of a List of Lists/Classes Fulfilling a Condition? — assert_list_element","text":"error condition met. input otherwise.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"Checks argument list objects inheriting S3 class type specified.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"","code":"assert_list_of( arg, cls, named = FALSE, optional = TRUE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_list_of\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"arg function argument checked cls S3 class type check named set TRUE, error issued elements list named. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"function throws error arg list arg list elements objects inheriting class type class. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_list_of.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a List of Objects of a Specific S3 Class or Type? — assert_list_of","text":"","code":"example_fun <- function(list) { assert_list_of(list, \"data.frame\") } example_fun(list(mtcars, iris)) try(example_fun(list(letters, 1:10))) #> Error in example_fun(list(letters, 1:10)) : #> Each element of the list in argument `list` must be class/type #> . #> ℹ But, element 1 is a character vector, and element 2 is an integer vector try(example_fun(c(TRUE, FALSE))) #> Error in example_fun(c(TRUE, FALSE)) : #> Argument `list` must be class , but is a logical vector. example_fun2 <- function(list) { assert_list_of(list, \"numeric\", named = TRUE) } try(example_fun2(list(1, 2, 3, d = 4))) #> Error in example_fun2(list(1, 2, 3, d = 4)) : #> All elements of `list` argument must be named. #> ℹ The indices of the unnamed elements are 1, 2, and 3"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"Checks argument logical scalar","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"","code":"assert_logical_scalar( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_logical_scalar\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown. Otherwise, NULL considered valid value. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"function throws error arg neither TRUE FALSE. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_logical_scalar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Logical Scalar (Boolean)? — assert_logical_scalar","text":"","code":"example_fun <- function(flag) { assert_logical_scalar(flag) } example_fun(FALSE) try(example_fun(NA)) #> Error in example_fun(NA) : #> Argument `flag` must be either TRUE or FALSE, but is `NA`. try(example_fun(c(TRUE, FALSE, FALSE))) #> Error in example_fun(c(TRUE, FALSE, FALSE)) : #> Argument `flag` must be either TRUE or FALSE, but is a logical vector. try(example_fun(1:10)) #> Error in example_fun(1:10) : #> Argument `flag` must be either TRUE or FALSE, but is an integer vector."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert Argument is a Named List or Vector — assert_named","title":"Assert Argument is a Named List or Vector — assert_named","text":"Assert elements argument named.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert Argument is a Named List or Vector — assert_named","text":"","code":"assert_named( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_named\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert Argument is a Named List or Vector — assert_named","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assert Argument is a Named List or Vector — assert_named","text":"function throws error arg named list vector returns input invisibly otherwise","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Assert Argument is a Named List or Vector — assert_named","text":"","code":"example_fun <- function(varval_list) { assert_named(varval_list) } example_fun(list(var1 = 1, var2 = \"x\")) try(example_fun(list(1, \"x\"))) #> Error in example_fun(list(1, \"x\")) : #> All elements of `varval_list` argument must be named. #> ℹ The indices of the unnamed elements are 1 and 2 try(example_fun(list(var = 1, \"x\"))) #> Error in example_fun(list(var = 1, \"x\")) : #> All elements of `varval_list` argument must be named. #> ℹ The indices of the unnamed elements are 2"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named_exprs.html","id":null,"dir":"Reference","previous_headings":"","what":"Assert Argument is a Named List of Expressions — assert_named_exprs","title":"Assert Argument is a Named List of Expressions — assert_named_exprs","text":"function deprecated, please use assert_expr_list() instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named_exprs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assert Argument is a Named List of Expressions — assert_named_exprs","text":"","code":"assert_named_exprs(arg, optional = FALSE)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named_exprs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assert Argument is a Named List of Expressions — assert_named_exprs","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_named_exprs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assert Argument is a Named List of Expressions — assert_named_exprs","text":"function throws error arg named list expression returns input invisibly otherwise","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Numeric Vector? — assert_numeric_vector","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"Checks argument numeric vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"","code":"assert_numeric_vector( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_numeric_vector\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"arg function argument checked optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"function throws error arg numeric vector. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_numeric_vector.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Numeric Vector? — assert_numeric_vector","text":"","code":"example_fun <- function(num) { assert_numeric_vector(num) } example_fun(1:10) try(example_fun(letters)) #> Error in example_fun(letters) : #> Argument `num` must be a numeric vector, but it is a character vector."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":null,"dir":"Reference","previous_headings":"","what":"Is There a One to One Mapping between Variables? — assert_one_to_one","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"Checks one one mapping two lists variables.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"","code":"assert_one_to_one( dataset, vars1, vars2, dataset_name = rlang::caller_arg(dataset), message = NULL, class = \"assert_one_to_one\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"dataset Dataset checked variables specified vars1 vars2 expected. vars1 First list variables vars2 Second list variables dataset_name string indicating label/symbol object checked. Default rlang::caller_arg(dataset). message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"dataset_name\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"error condition meet. input otherwise.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_one_to_one.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is There a One to One Mapping between Variables? — assert_one_to_one","text":"","code":"library(dplyr) library(rlang) df <- tribble( ~SPECIES, ~SPECIESN, \"DOG\", 1L, \"CAT\", 2L, \"DOG\", 1L ) assert_one_to_one(df, vars1 = exprs(SPECIES), vars2 = exprs(SPECIESN)) df_many <- tribble( ~SPECIES, ~SPECIESN, \"DOG\", 1L, \"CAT\", 2L, \"DOG\", 3L ) try( assert_one_to_one(df_many, vars1 = exprs(SPECIES), vars2 = exprs(SPECIESN)) ) #> Error in eval(expr, envir, enclos) : #> For some values of \"SPECIES\" there is more than one value of \"SPECIESN\" #> ℹ Call `admiral::get_one_to_many_dataset()` to get all one-to-many values. try( assert_one_to_one(df_many, vars1 = exprs(SPECIESN), vars2 = exprs(SPECIES)) ) #> Error in eval(expr, envir, enclos) : #> There is more than one value of \"SPECIESN\" for some values of \"SPECIES\" #> ℹ Call `admiral::get_many_to_one_dataset()` to get all many-to-one values."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":null,"dir":"Reference","previous_headings":"","what":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"Checks parameter (PARAMCD) exist dataset.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"","code":"assert_param_does_not_exist( dataset, param, arg_name = rlang::caller_arg(dataset), message = NULL, class = \"assert_param_does_not_exist\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"dataset data.frame param Parameter code check arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"function throws error parameter exists input dataset. Otherwise, dataset returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_param_does_not_exist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Asserts That a Parameter Does Not Exist in the Dataset — assert_param_does_not_exist","text":"","code":"library(dplyr) advs <- tribble( ~USUBJID, ~VSTESTCD, ~VSTRESN, ~VSSTRESU, ~PARAMCD, ~AVAL, \"P01\", \"WEIGHT\", 80.1, \"kg\", \"WEIGHT\", 80.1, \"P02\", \"WEIGHT\", 85.7, \"kg\", \"WEIGHT\", 85.7 ) assert_param_does_not_exist(advs, param = \"HR\") try(assert_param_does_not_exist(advs, param = \"WEIGHT\")) #> Error in eval(expr, envir, enclos) : #> The parameter code \"WEIGHT\" already exists in dataset `advs`."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"Checks argument object inheriting S3 class specified.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"","code":"assert_s3_class( arg, cls, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_s3_class\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"arg function argument checked cls S3 class check optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"function throws error arg object inherit class. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_s3_class.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument an Object of a Specific S3 Class? — assert_s3_class","text":"","code":"example_fun <- function(obj) { assert_s3_class(obj, \"factor\") } example_fun(as.factor(letters)) try(example_fun(letters)) #> Error in example_fun(letters) : #> Argument `obj` must be class , but is a character vector. try(example_fun(1:10)) #> Error in example_fun(1:10) : #> Argument `obj` must be class , but is an integer vector."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":null,"dir":"Reference","previous_headings":"","what":"Are All Argument of the Same Type? — assert_same_type","title":"Are All Argument of the Same Type? — assert_same_type","text":"Checks arguments type.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Are All Argument of the Same Type? — assert_same_type","text":"","code":"assert_same_type( ..., .message = c(\"Arguments {.arg {arg_names}} must be the same type.\", i = paste(\"Argument types are\", paste0(\"{.arg \", arg_names, \"} {.cls \", types, \"}\", collapse = \", \"))), .class = \"assert_same_type\", .call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Are All Argument of the Same Type? — assert_same_type","text":"... Arguments checked .message character vector passed cli_abort(message) assertion fails. .class character vector passed cli_abort(class) assertion fails. .call environment passed cli_abort(call) assertion fails.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Are All Argument of the Same Type? — assert_same_type","text":"function throws error arguments type.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_same_type.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Are All Argument of the Same Type? — assert_same_type","text":"","code":"example_fun <- function(true_value, false_value, missing_value) { assert_same_type(true_value, false_value, missing_value) } example_fun( true_value = \"Y\", false_value = \"N\", missing_value = NA_character_ ) try(example_fun( true_value = 1, false_value = 0, missing_value = \"missing\" )) #> Error in example_fun(true_value = 1, false_value = 0, missing_value = \"missing\") : #> Arguments `true_value`, `false_value`, and `missing_value` must be the #> same type. #> ℹ Argument types are `true_value` , `false_value` , #> `missing_value` "},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Symbol? — assert_symbol","title":"Is an Argument a Symbol? — assert_symbol","text":"Checks argument symbol","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Symbol? — assert_symbol","text":"","code":"assert_symbol( arg, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_symbol\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Symbol? — assert_symbol","text":"arg function argument checked. Must symbol. See examples. optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Symbol? — assert_symbol","text":"function throws error arg symbol returns input invisibly otherwise.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_symbol.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Symbol? — assert_symbol","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) dm <- dplyr::tribble( ~DOMAIN, ~USUBJID, \"DM\", \"01-701-1015\", \"DM\", \"01-701-1016\", ) example_fun <- function(dat, var) { var <- assert_symbol(enexpr(var)) select(dat, !!var) } example_fun(dm, USUBJID) #> # A tibble: 2 × 1 #> USUBJID #> #> 1 01-701-1015 #> 2 01-701-1016 try(example_fun(dm)) #> Error in example_fun(dm) : #> Argument `enexpr(var)` must be a , but is missing. try(example_fun(dm, \"USUBJID\")) #> Error in example_fun(dm, \"USUBJID\") : #> Argument `enexpr(var)` must be a , but is a string. try(example_fun(dm, toupper(PARAMCD))) #> Error in example_fun(dm, toupper(PARAMCD)) : #> Argument `enexpr(var)` must be a , but is a call."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":null,"dir":"Reference","previous_headings":"","what":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"Checks parameter (PARAMCD) dataset provided expected unit.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"","code":"assert_unit( dataset, param, required_unit, get_unit_expr, arg_name = rlang::caller_arg(required_unit), message = NULL, class = \"assert_unit\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"dataset data.frame param Parameter code parameter check required_unit Expected unit get_unit_expr Expression used provide unit param arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"function throws error unit variable differs unit observation parameter input dataset. Otherwise, dataset returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_unit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Asserts That a Parameter is Provided in the Expected Unit — assert_unit","text":"","code":"library(dplyr) advs <- tribble( ~USUBJID, ~VSTESTCD, ~VSTRESN, ~VSSTRESU, ~PARAMCD, ~AVAL, \"P01\", \"WEIGHT\", 80.1, \"kg\", \"WEIGHT\", 80.1, \"P02\", \"WEIGHT\", 85.7, \"kg\", \"WEIGHT\", 85.7 ) assert_unit(advs, param = \"WEIGHT\", required_unit = \"kg\", get_unit_expr = VSSTRESU)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a List of Variables? — assert_vars","title":"Is an Argument a List of Variables? — assert_vars","text":"Checks argument valid list symbols (e.g., created exprs())","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a List of Variables? — assert_vars","text":"","code":"assert_vars( arg, expect_names = FALSE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_vars\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a List of Variables? — assert_vars","text":"arg function argument checked expect_names argument set TRUE, checked variables named, e.g., exprs(APERSDT = APxxSDT, APEREDT = APxxEDT). optional checked argument optional? set FALSE arg NULL error thrown arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a List of Variables? — assert_vars","text":"function throws error arg list symbols (e.g., created exprs() returns input invisibly otherwise.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a List of Variables? — assert_vars","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) example_fun <- function(by_vars) { assert_vars(by_vars) } example_fun(exprs(USUBJID, PARAMCD)) try(example_fun(quos(USUBJID, PARAMCD))) #> Error in example_fun(quos(USUBJID, PARAMCD)) : #> Each element of the list in argument `by_vars` must be class/type #> . #> ℹ But, element 1 is a object, and element 2 is a object try(example_fun(c(\"USUBJID\", \"PARAMCD\", \"VISIT\"))) #> Error in example_fun(c(\"USUBJID\", \"PARAMCD\", \"VISIT\")) : #> Argument `by_vars` must be class , but is a character vector. try(example_fun(exprs(USUBJID, toupper(PARAMCD), desc(AVAL)))) #> Error in example_fun(exprs(USUBJID, toupper(PARAMCD), desc(AVAL))) : #> Each element of the list in argument `by_vars` must be class/type #> . #> ℹ But, element 2 is a call, and element 3 is a call example_fun_name <- function(by_vars) { assert_vars(by_vars, expect_names = TRUE) } example_fun_name(exprs(APERSDT = APxxSDT, APEREDT = APxxEDT)) try(example_fun_name(exprs(APERSDT = APxxSDT, APxxEDT))) #> Error in example_fun_name(exprs(APERSDT = APxxSDT, APxxEDT)) : #> All elements of `by_vars` argument must be named. #> ℹ The indices of the unnamed elements are 2"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Is an Argument a Variable-Value List? — assert_varval_list","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"Checks argument list expressions expressions variable-value pairs. value can symbol, string, numeric, expression, NA.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"","code":"assert_varval_list( arg, required_elements = NULL, accept_expr = TRUE, accept_var = FALSE, optional = FALSE, arg_name = rlang::caller_arg(arg), message = NULL, class = \"assert_varval_list\", call = parent.frame() )"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"arg function argument checked required_elements character vector names must present arg accept_expr expressions right hand side accepted? accept_var unnamed variable names (e.g. exprs(USUBJID)) right hand side accepted? optional checked argument optional? set FALSE arg NULL error thrown. arg_name string indicating label/symbol object checked. message string passed cli::cli_abort(message). NULL, default messaging used (see examples default messages). \"{arg_name}\" can used messaging. class Subclass condition. call execution environment currently running function, e.g. call = caller_env(). corresponding function call retrieved mentioned error messages source error. need supply call throwing condition helper function relevant mention message. Can also NULL defused function call respectively display call hard-code code display. information error calls, see Including function calls error messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"function throws error arg list variable-value expressions. Otherwise, input returned invisibly.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/assert_varval_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Is an Argument a Variable-Value List? — assert_varval_list","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) example_fun <- function(vars) { assert_varval_list(vars) } example_fun(exprs(DTHDOM = \"AE\", DTHSEQ = AESEQ)) try(example_fun(exprs(\"AE\", DTSEQ = AESEQ))) #> Error in example_fun(exprs(\"AE\", DTSEQ = AESEQ)) : #> Argument `vars` must be a named list of expressions where each element #> is a symbol, character scalar, numeric scalar, an expression, or NA, but is a #> list. #> ℹ To create a list of expressions use `exprs()`."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/backquote.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap a String in Backquotes — backquote","title":"Wrap a String in Backquotes — backquote","text":"Wrap String Backquotes","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/backquote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap a String in Backquotes — backquote","text":"","code":"backquote(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/backquote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap a String in Backquotes — backquote","text":"x character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/backquote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrap a String in Backquotes — backquote","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/contains_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","title":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","text":"check argument contains valid variable(s) created exprs() Source Variables List Expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/contains_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","text":"","code":"contains_vars(arg)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/contains_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","text":"arg function argument checked","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/contains_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"check that argument contains valid variable(s) created with exprs() or Source Variables from a List of Expressions — contains_vars","text":"TRUE variables valid variable","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/convert_dtm_to_dtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","title":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","text":"Helper Function Convert Date (Date-time) Objects Characters dtc Format (-DTC type variable)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/convert_dtm_to_dtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","text":"","code":"convert_dtm_to_dtc(dtm)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/convert_dtm_to_dtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","text":"dtm date date-time","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/convert_dtm_to_dtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Helper Function to Convert Date (or Date-time) Objects to Characters of dtc Format (-DTC type of variable) — convert_dtm_to_dtc","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dataset_vignette.html","id":null,"dir":"Reference","previous_headings":"","what":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","title":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","text":"Output dataset vignette pre-specified admiral format.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dataset_vignette.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","text":"","code":"dataset_vignette(dataset, display_vars = NULL, filter = NULL)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dataset_vignette.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","text":"dataset Dataset output vignette display_vars Variables selected demonstrate outcome derivation Permitted Values: list variables Default NULL display_vars NULL, selected variables visible vignette variables hidden. can made visible clicking theChoose columns display button. filter Filter condition specified condition applied dataset displayed. Permitted Values: condition","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dataset_vignette.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Output a Dataset in a Vignette in the admiral Format — dataset_vignette","text":"HTML table","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dquote.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap a String in Double Quotes — dquote","title":"Wrap a String in Double Quotes — dquote","text":"Wrap string double quotes, e.g., displaying character values messages.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dquote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap a String in Double Quotes — dquote","text":"","code":"dquote(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dquote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap a String in Double Quotes — dquote","text":"x character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/dquote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrap a String in Double Quotes — dquote","text":"input NULL, text \"NULL\" returned. Otherwise, input double quotes returned.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":null,"dir":"Reference","previous_headings":"","what":"Enumerate Multiple Elements — enumerate","title":"Enumerate Multiple Elements — enumerate","text":"Enumerate multiple elements vector list.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Enumerate Multiple Elements — enumerate","text":"","code":"enumerate(x, quote_fun = backquote, conjunction = \"and\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Enumerate Multiple Elements — enumerate","text":"x vector list quote_fun Quoting function, defaults backquote. set NULL, elements quoted. conjunction Character used message, defaults \"\".","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Enumerate Multiple Elements — enumerate","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/enumerate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Enumerate Multiple Elements — enumerate","text":"","code":"enumerate(c(\"one\", \"two\", \"three\")) #> Warning: `enumerate()` was deprecated in admiraldev 1.1.0. #> ℹ This function was primarily used in error messaging, and can be replaced with #> 'cli' functionality: `cli::cli_abort('{.val {letters[1:3]}}')` #> [1] \"`one`, `two` and `three`\" enumerate(c(1, 2, 3), quote_fun = NULL) #> [1] \"1, 2 and 3\""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":null,"dir":"Reference","previous_headings":"","what":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"Uses diffdf::diffdf() compares 2 datasets differences. function can thought R-equivalent SAS proc compare useful tool unit testing well.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"","code":"expect_dfs_equal(base, compare, keys, ...)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"base Input dataset compare Comparison dataset keys character vector variables define unique row base compare datasets ... Additional arguments passed onto diffdf::diffdf()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"error base compare match NULL invisibly ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expect_dfs_equal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Expectation: Are Two Datasets Equal? — expect_dfs_equal","text":"","code":"library(dplyr, warn.conflicts = FALSE) tbl1 <- tribble( ~USUBJID, ~AGE, ~SEX, \"1001\", 18, \"M\", \"1002\", 19, \"F\", \"1003\", 20, \"M\", \"1004\", 18, \"F\" ) tbl2 <- tribble( ~USUBJID, ~AGE, ~SEX, \"1001\", 18, \"M\", \"1002\", 18.9, \"F\", \"1003\", 20, NA ) try(expect_dfs_equal(tbl1, tbl2, keys = \"USUBJID\")) #> Error : Differences found between the objects! #> #> A summary is given below. #> #> There are rows in BASE that are not in COMPARE !! #> All rows are shown in table below #> #> ========= #> USUBJID #> --------- #> 1004 #> --------- #> #> Not all Values Compared Equal #> All rows are shown in table below #> #> ============================= #> Variable No of Differences #> ----------------------------- #> AGE 1 #> SEX 1 #> ----------------------------- #> #> #> All rows are shown in table below #> #> ================================== #> VARIABLE USUBJID BASE COMPARE #> ---------------------------------- #> AGE 1002 19 18.9 #> ---------------------------------- #> #> #> All rows are shown in table below #> #> ================================== #> VARIABLE USUBJID BASE COMPARE #> ---------------------------------- #> SEX 1003 M #> ---------------------------------- #> tlb3 <- tribble( ~USUBJID, ~AGE, ~SEX, \"1004\", 18, \"F\", \"1003\", 20, \"M\", \"1002\", 19, \"F\", \"1001\", 18, \"M\", ) # Note the sorting order of the keys is not required expect_dfs_equal(tbl1, tlb3, keys = \"USUBJID\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expr_c.html","id":null,"dir":"Reference","previous_headings":"","what":"Concatenate One or More Expressions — expr_c","title":"Concatenate One or More Expressions — expr_c","text":"Concatenate One Expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expr_c.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Concatenate One or More Expressions — expr_c","text":"","code":"expr_c(...)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expr_c.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Concatenate One or More Expressions — expr_c","text":"... One expressions list expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/expr_c.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Concatenate One or More Expressions — expr_c","text":"list expressions","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract All Symbols from a List of Expressions — extract_vars","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"Extract Symbols List Expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"","code":"extract_vars(x, side = \"lhs\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"x R object side One \"lhs\" (default) \"rhs\" formulas","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"list expressions","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/extract_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract All Symbols from a List of Expressions — extract_vars","text":"","code":"library(rlang) extract_vars(exprs(PARAMCD, (BASE - AVAL) / BASE + 100)) #> [[1]] #> PARAMCD #> #> [[2]] #> BASE #> #> [[3]] #> AVAL #> extract_vars(AVAL ~ ARMCD + AGEGR1) #> [[1]] #> AVAL #> extract_vars(AVAL ~ ARMCD + AGEGR1, side = \"rhs\") #> [[1]] #> ARMCD #> #> [[2]] #> AGEGR1 #>"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/filter_if.html","id":null,"dir":"Reference","previous_headings":"","what":"Optional Filter — filter_if","title":"Optional Filter — filter_if","text":"Filters input dataset provided expression NULL","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/filter_if.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Optional Filter — filter_if","text":"","code":"filter_if(dataset, filter)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/filter_if.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Optional Filter — filter_if","text":"dataset Input dataset filter filter condition. Must expression.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/filter_if.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Optional Filter — filter_if","text":"data.frame containing rows dataset matching filter just dataset filter NULL","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":null,"dir":"Reference","previous_headings":"","what":"Return English-friendly messaging for object-types — friendly_type_of","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"Return English-friendly messaging object-types","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"","code":"friendly_type_of(x, value = TRUE, length = FALSE)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"x R object. value Whether describe value x. length Whether mention length vectors lists.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"string describing type. Starts indefinite article, e.g. \"integer vector\".","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/friendly_type_of.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Return English-friendly messaging for object-types — friendly_type_of","text":"helper function aids us forming user-friendly messages gets called what_is_it(), often used assertion functions identify object-type user passed argument instead expected-type.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_constant_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Constant Variables — get_constant_vars","title":"Get Constant Variables — get_constant_vars","text":"Get Constant Variables","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_constant_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Constant Variables — get_constant_vars","text":"","code":"get_constant_vars(dataset, by_vars, ignore_vars = NULL)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_constant_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Constant Variables — get_constant_vars","text":"dataset data frame. by_vars variables groups defined variables considered separately. .e., variable constant within group, returned. ignore_vars Variables ignore specified variables considered, .e., returned even constant (unless included variables). Permitted Values: list variable names selector function calls like starts_with(\"EX\")","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_constant_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Constant Variables — get_constant_vars","text":"Variable vector.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"Retrieve Dataset admiraldev_environment environment","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"","code":"get_dataset(name)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"name name dataset retrieve","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"data.frame","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_dataset.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieve a Dataset from the admiraldev_environment environment — get_dataset","text":"Sometimes, developers may want provide information users fit warning error message. example, input dataset function contains unexpected records, can stored separate dataset, users can access investigate issue. achieve , R data structure known 'environment'. environment objects created build time, can populated values package loaded update values course R session. , establishment admiraldev_environment allows us create dynamic data/objects based user-inputs need modification. purpose get_dataset retrieve datasets contained inside admiraldev_environment. Currently support two datasets inside admiraldev_environment object: one_to_many many_to_one","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Duplicates From a Vector — get_duplicates","title":"Get Duplicates From a Vector — get_duplicates","text":"Get Duplicates Vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Duplicates From a Vector — get_duplicates","text":"","code":"get_duplicates(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Duplicates From a Vector — get_duplicates","text":"x atomic vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Duplicates From a Vector — get_duplicates","text":"vector type x contain duplicate values","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_duplicates.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Duplicates From a Vector — get_duplicates","text":"","code":"get_duplicates(1:10) #> integer(0) get_duplicates(c(\"a\", \"a\", \"b\", \"c\", \"d\", \"d\")) #> [1] \"a\" \"d\""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"Get New Temporary Variable Name Dataset","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"","code":"get_new_tmp_var(dataset, prefix = \"tmp_var\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"dataset input dataset prefix prefix new temporary variable name create","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"name new temporary variable symbol","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"function returns new unique temporary variable name used inside dataset. temporary variable names structure prefix_n n integer, e.g. tmp_var_1. already variable inside datset given prefix suffix increased 1, e.g. tmp_var_1 already exists get_new_tmp_var() return tmp_var_2.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_new_tmp_var.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a New Temporary Variable Name for a Dataset — get_new_tmp_var","text":"","code":"library(dplyr, warn.conflicts = FALSE) dm <- tribble( ~DOMAIN, ~STUDYID, ~USUBJID, \"DM\", \"STUDY X\", \"01-701-1015\", \"DM\", \"STUDY X\", \"01-701-1016\", ) tmp_var <- get_new_tmp_var(dm) mutate(dm, !!tmp_var := NA) #> # A tibble: 2 × 4 #> DOMAIN STUDYID USUBJID tmp_var_1 #> #> 1 DM STUDY X 01-701-1015 NA #> 2 DM STUDY X 01-701-1016 NA"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_source_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Source Variables from a List of Expressions — get_source_vars","title":"Get Source Variables from a List of Expressions — get_source_vars","text":"Get Source Variables List Expressions","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_source_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Source Variables from a List of Expressions — get_source_vars","text":"","code":"get_source_vars(expressions, quosures)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_source_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Source Variables from a List of Expressions — get_source_vars","text":"expressions list expressions quosures Deprecated, please use expressions instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/get_source_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Source Variables from a List of Expressions — get_source_vars","text":"list expressions","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-notin-grapes.html","id":null,"dir":"Reference","previous_headings":"","what":"Negated Value Matching — %notin%","title":"Negated Value Matching — %notin%","text":"Returns logical vector indicating match left operand right operand.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-notin-grapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Negated Value Matching — %notin%","text":"","code":"x %notin% table"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-notin-grapes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Negated Value Matching — %notin%","text":"x values matched table values matched ","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-notin-grapes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Negated Value Matching — %notin%","text":"logical vector","code":""},{"path":[]},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-or-grapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Or — %or%","text":"","code":"lhs %or% rhs"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-or-grapes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Or — %or%","text":"lhs valid R expression rhs valid R expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-or-grapes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Or — %or%","text":"Either result evaluating lhs, rhs error","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/grapes-or-grapes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Or — %or%","text":"function evaluates expression lhs expression results error, catches error proceeds evaluating expression rhs returns result.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_auto.html","id":null,"dir":"Reference","previous_headings":"","what":"Checks if the argument equals the auto keyword — is_auto","title":"Checks if the argument equals the auto keyword — is_auto","text":"Checks argument equals auto keyword","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_auto.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Checks if the argument equals the auto keyword — is_auto","text":"","code":"is_auto(arg)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_auto.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Checks if the argument equals the auto keyword — is_auto","text":"arg argument check","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_auto.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Checks if the argument equals the auto keyword — is_auto","text":"TRUE argument equals auto keyword, .e., expression symbol named auto.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_order_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Is order vars? — is_order_vars","title":"Is order vars? — is_order_vars","text":"Check inputs created using exprs() calls involving desc()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_order_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is order vars? — is_order_vars","text":"","code":"is_order_vars(arg)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_order_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is order vars? — is_order_vars","text":"arg R object","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_order_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is order vars? — is_order_vars","text":"FALSE argument list order vars","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_valid_dtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Is this string a valid DTC — is_valid_dtc","title":"Is this string a valid DTC — is_valid_dtc","text":"string valid DTC","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_valid_dtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Is this string a valid DTC — is_valid_dtc","text":"","code":"is_valid_dtc(arg)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_valid_dtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Is this string a valid DTC — is_valid_dtc","text":"arg character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/is_valid_dtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Is this string a valid DTC — is_valid_dtc","text":"TRUE argument valid --DTC string, FALSE otherwise","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/joins.html","id":null,"dir":"Reference","previous_headings":"","what":"Join Functions — anti_join","title":"Join Functions — anti_join","text":"*_join() functions {dplyr} without warning different attributes datasets.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/joins.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join Functions — anti_join","text":"","code":"anti_join(x, y, by = NULL, copy = FALSE, ...) inner_join(x, y, by = NULL, copy = FALSE, suffix = c(\".x\", \".y\"), ...) left_join(x, y, by = NULL, copy = FALSE, suffix = c(\".x\", \".y\"), ...)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/joins.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join Functions — anti_join","text":"x data.frame y data.frame character vector copy logical ... Additional arguments suffix character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/joins.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join Functions — anti_join","text":"data.frame","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":null,"dir":"Reference","previous_headings":"","what":"Process set_values_to Argument — process_set_values_to","title":"Process set_values_to Argument — process_set_values_to","text":"function creates variables specified set_values_to argument, catches errors, provides user friendly error messages, optionally checks type created variables.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process set_values_to Argument — process_set_values_to","text":"","code":"process_set_values_to(dataset, set_values_to = NULL, expected_types = NULL)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process set_values_to Argument — process_set_values_to","text":"dataset Input dataset set_values_to Variables set named list returned exprs() defining variables set, e.g. exprs(PARAMCD = \"OS\", PARAM = \"Overall Survival\") expected. values must symbols, character strings, numeric values, expressions, NA. expected_types argument specified, specified variables checked whether specified type matches type variables created set_values_to. Permitted Values: character vector values \"numeric\" \"character\"","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process set_values_to Argument — process_set_values_to","text":"input dataset variables specified set_values_to added/updated","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/process_set_values_to.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Process set_values_to Argument — process_set_values_to","text":"","code":"library(dplyr) data <- tribble( ~AVAL, 20 ) try( process_set_values_to( data, set_values_to = exprs( PARAMCD = BMI ) ) ) #> Error in process_set_values_to(data, set_values_to = exprs(PARAMCD = BMI)) : #> Assigning variables failed! #> • `set_values_to = exprs(PARAMCD = BMI)` #> See error message below: #> ℹ In argument: `PARAMCD = BMI`. Caused by error: ! object 'BMI' not found try( process_set_values_to( data, set_values_to = exprs( PARAMCD = 42 ), expected_types = c(PARAMCD = \"character\") ) ) #> Error in process_set_values_to(data, set_values_to = exprs(PARAMCD = 42), : #> The following variables have an unexpected type: #> • PARAMCD: expected is , but it is ."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"Remove Temporary Variables Created Within Current Function Environment","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"","code":"remove_tmp_vars(dataset)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"dataset input dataset","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"input dataset temporary variables removed","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/remove_tmp_vars.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove All Temporary Variables Created Within the Current Function Environment — remove_tmp_vars","text":"","code":"library(dplyr, warn.conflicts = FALSE) dm <- tribble( ~DOMAIN, ~STUDYID, ~USUBJID, \"DM\", \"STUDY X\", \"01-701-1015\", \"DM\", \"STUDY X\", \"01-701-1016\", ) dm <- select(dm, USUBJID) tmp_var <- get_new_tmp_var(dm) dm <- mutate(dm, !!tmp_var := NA) ## This function creates two new temporary variables which are removed when calling ## `remove_tmp_vars()`. Note that any temporary variable created outside this ## function is **not** removed do_something <- function(dataset) { tmp_var_1 <- get_new_tmp_var(dm) tmp_var_2 <- get_new_tmp_var(dm) dm %>% mutate(!!tmp_var_1 := NA, !!tmp_var_2 := NA) %>% print() %>% remove_tmp_vars() } do_something(dm) #> # A tibble: 2 × 4 #> USUBJID tmp_var_1 tmp_var_2 tmp_var_3 #> #> 1 01-701-1015 NA NA NA #> 2 01-701-1016 NA NA NA #> # A tibble: 2 × 2 #> USUBJID tmp_var_1 #> #> 1 01-701-1015 NA #> 2 01-701-1016 NA"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Symbols in an Expression — replace_symbol_in_expr","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"Replace symbols expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"","code":"replace_symbol_in_expr(expression, target, replace)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"expression Expression target Target symbol replace Replacing symbol","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"expression every occurrence symbol target replaced replace","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"Stefan Bundfuss","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_symbol_in_expr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replace Symbols in an Expression — replace_symbol_in_expr","text":"","code":"library(rlang) replace_symbol_in_expr(expr(AVAL), target = AVAL, replace = AVAL.join) #> AVAL.join replace_symbol_in_expr(expr(AVALC), target = AVAL, replace = AVAL.join) #> AVALC replace_symbol_in_expr(expr(desc(AVAL)), target = AVAL, replace = AVAL.join) #> desc(AVAL.join)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace Expression Value with Name — replace_values_by_names","title":"Replace Expression Value with Name — replace_values_by_names","text":"Replace Expression Value Name","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace Expression Value with Name — replace_values_by_names","text":"","code":"replace_values_by_names(expressions, quosures)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace Expression Value with Name — replace_values_by_names","text":"expressions list expressions quosures Deprecated, please use expressions instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace Expression Value with Name — replace_values_by_names","text":"list expressions","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/replace_values_by_names.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replace Expression Value with Name — replace_values_by_names","text":"","code":"library(rlang) replace_values_by_names(exprs(AVAL, ADT = convert_dtc_to_dt(EXSTDTC))) #> [[1]] #> AVAL #> #> $ADT #> ADT #>"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/squote.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap a String in Single Quotes — squote","title":"Wrap a String in Single Quotes — squote","text":"Wrap String Single Quotes","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/squote.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap a String in Single Quotes — squote","text":"","code":"squote(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/squote.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap a String in Single Quotes — squote","text":"x character vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/squote.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrap a String in Single Quotes — squote","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":null,"dir":"Reference","previous_headings":"","what":"Suppress Specific Warnings — suppress_warning","title":"Suppress Specific Warnings — suppress_warning","text":"Suppress certain warnings issued expression.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Suppress Specific Warnings — suppress_warning","text":"","code":"suppress_warning(expr, regexpr)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Suppress Specific Warnings — suppress_warning","text":"expr Expression executed regexpr Regular expression matching warnings suppress","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Suppress Specific Warnings — suppress_warning","text":"Return value expression","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/suppress_warning.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Suppress Specific Warnings — suppress_warning","text":"warnings issued expression match regular expression suppressed.","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/valid_time_units.html","id":null,"dir":"Reference","previous_headings":"","what":"Valid Time Units — valid_time_units","title":"Valid Time Units — valid_time_units","text":"Contains acceptable character vector valid time units","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/valid_time_units.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Valid Time Units — valid_time_units","text":"","code":"valid_time_units()"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/valid_time_units.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Valid Time Units — valid_time_units","text":"character vector valid time units","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":null,"dir":"Reference","previous_headings":"","what":"Turn a List of Expressions into a Character Vector — vars2chr","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"Turn List Expressions Character Vector","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"","code":"vars2chr(expressions, quosures)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"expressions list expressions created using exprs() quosures Deprecated, please use expressions instead.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"character vector","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/vars2chr.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Turn a List of Expressions into a Character Vector — vars2chr","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) vars2chr(exprs(USUBJID, AVAL)) #> #> \"USUBJID\" \"AVAL\""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_incomplete_dtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Warn if incomplete dtc — warn_if_incomplete_dtc","title":"Warn if incomplete dtc — warn_if_incomplete_dtc","text":"Warn incomplete dtc","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_incomplete_dtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Warn if incomplete dtc — warn_if_incomplete_dtc","text":"","code":"warn_if_incomplete_dtc(dtc, n)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_incomplete_dtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Warn if incomplete dtc — warn_if_incomplete_dtc","text":"dtc character vector date-times ISO 8601 format n non-negative integer","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_incomplete_dtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Warn if incomplete dtc — warn_if_incomplete_dtc","text":"warning dtc contains partial dates","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":null,"dir":"Reference","previous_headings":"","what":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"Checks two list inputs names number elements issues warning otherwise.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"","code":"warn_if_inconsistent_list(base, compare, list_name, i = 2)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"base named list compare named list list_name string name list index id compare 2 lists","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"warning 2 lists different names length","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_inconsistent_list.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Warn If Two Lists are Inconsistent — warn_if_inconsistent_list","text":"","code":"library(dplyr, warn.conflicts = FALSE) library(rlang) # no warning warn_if_inconsistent_list( base = exprs(DTHDOM = \"DM\", DTHSEQ = DMSEQ), compare = exprs(DTHDOM = \"DM\", DTHSEQ = DMSEQ), list_name = \"Test\" ) # warning warn_if_inconsistent_list( base = exprs(DTHDOM = \"DM\", DTHSEQ = DMSEQ, DTHVAR = \"text\"), compare = exprs(DTHDOM = \"DM\", DTHSEQ = DMSEQ), list_name = \"Test\" ) #> Warning: The variables used for traceability in `Test` are not consistent, please check: #> source 1 , Variables are given as: DTHDOM DTHSEQ DTHVAR #> source 2 , Variables are given as: DTHDOM DTHSEQ"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":null,"dir":"Reference","previous_headings":"","what":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"Warn vector contains unknown datetime format \"2003-12-15T-:15:18\", \"2003-12-15T13:-:19\",\"--12-15\",\"-----T07:15\"","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"","code":"warn_if_invalid_dtc(dtc, is_valid = is_valid_dtc(dtc))"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"dtc character vector containing dates is_valid logical vector indicating whether elements dtc valid","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"return value, called side effects","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_invalid_dtc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Warn If a Vector Contains Unknown Datetime Format — warn_if_invalid_dtc","text":"","code":"## No warning as `dtc` is a valid date format warn_if_invalid_dtc(dtc = \"2021-04-06\") ## Issues a warning warn_if_invalid_dtc(dtc = \"2021-04-06T-:30:30\")"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":null,"dir":"Reference","previous_headings":"","what":"Warn If a Variable Already Exists — warn_if_vars_exist","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"Warn variable already exists inside dataset","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"","code":"warn_if_vars_exist(dataset, vars)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"dataset data.frame vars character vector columns check dataset","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"return value, called side effects","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/warn_if_vars_exist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Warn If a Variable Already Exists — warn_if_vars_exist","text":"","code":"library(dplyr, warn.conflicts = FALSE) dm <- tribble( ~USUBJID, ~ARM, \"01-701-1015\", \"Placebo\", \"01-701-1016\", \"Placebo\", ) ## No warning as `AAGE` doesn't exist in `dm` warn_if_vars_exist(dm, \"AAGE\") ## Issues a warning warn_if_vars_exist(dm, \"ARM\") #> Warning: Variable \"ARM\" already exists in the dataset."},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":null,"dir":"Reference","previous_headings":"","what":"What Kind of Object is This? — what_is_it","title":"What Kind of Object is This? — what_is_it","text":"Returns string describing kind object input .","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"What Kind of Object is This? — what_is_it","text":"","code":"what_is_it(x)"},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"What Kind of Object is This? — what_is_it","text":"x R object","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"What Kind of Object is This? — what_is_it","text":"character description type x","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/reference/what_is_it.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"What Kind of Object is This? — what_is_it","text":"","code":"what_is_it(\"abc\") #> Warning: `what_is_it()` was deprecated in admiraldev 1.1.0. #> ℹ This function was primarily used in error messaging, and can be replaced with #> 'cli' functionality: `cli::cli_abort('{.obj_type_friendly {letters}}')`. #> [1] \"`\\\"abc\\\"`\" what_is_it(1L) #> [1] \"`1`\" what_is_it(1:10) #> [1] \"an integer vector\" what_is_it(mtcars) #> [1] \"a data frame\""},{"path":[]},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-development-version","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev (development version)","text":"Error messaging throughout package updated rlang::abort() cli::cli_abort(). part update, assert_*() functions new arguments assert_*(message, arg_name, call, class). (#367) Warning messaging also updated use cli messaging.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-development-version","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev (development version)","text":"renv related files removed. (#360) longer exporting is_named() function. (#401) pharmaversesdtm removed dependency. (#434) part error messaging update, following changes made. assert_s3_class(class) argument renamed assert_s3_class(cls). (#367) Functions arg_name(), enumerate(), what_is_it(), friendly_type_of() deprecated warning returned developer using functions. developer functions (opposed functions typical admiral users), use short deprecation cycle.","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-development-version","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev (development version)","text":"“Release Strategy” vignette updated respect new branching strategy. (#353) “Release Strategy” vignette now contains short new “Release Tracking” section linking external dashboard CRAN packages awaiting release. (#358)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"other-development-version","dir":"Changelog","previous_headings":"","what":"Other","title":"admiraldev (development version)","text":"Removed dependencies needed build package package documentation. (#426) Increased minimum R version required 4.0 match {admiral}. (#382) addin_format_testthat addin moved {pharmaverse4devs} package. (#419)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-100","dir":"Changelog","previous_headings":"","what":"admiraldev 1.0.0","title":"admiraldev 1.0.0","text":"CRAN release: 2023-12-15","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-1-0-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 1.0.0","text":"assert_function() now accepts function arguments ellipsis, ... function formals (#339)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-1-0-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 1.0.0","text":"assert_function_param() assert_named_expr() assert_has_variables()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-1-0-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 1.0.0","text":"New documentation programming strategy around quoting/expressions standardizing roxygen texts (#233, #332) New documentation use footnotes writing vignettes (#324) Updated language images adopt GitHub Flow Strategy (#349)","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-050","dir":"Changelog","previous_headings":"","what":"admiraldev 0.5.0","title":"admiraldev 0.5.0","text":"CRAN release: 2023-09-11","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-5-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.5.0","text":"Calls admiral.test swapped pharmaversesdtm (#321) New vignette package writing extensions now available (#295, #312) New vignette creating test data now available (#282)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-0-5-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 0.5.0","text":"messaging warn_if_invalid_dtc() updated align date/datetime functions admiral currently . (#316)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-5-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.5.0","text":"assert_order_vars() quo_c() quo_not_missing() replace_symbol_in_quo() quosures argument replaced expressions argument replace_values_by_names(), get_source_vars(), vars2chr(). (#288) assert_function_param() deprecated favor assert_function(). (#264) assert_named_expr() deprecated favor assert_expr_list(). (#264) assert_has_variables() deprecated favor assert_data_frame(). (#264)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-5-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.5.0","text":"Guidance around issues merging updated (#286) Common R CMD troubleshooting made separate vignette (#286) Documentation get_dataset() improved. (#271) Minor updates programming strategy added (#213, #240, #260) Updated unit testing vignette snapshot testing guidance. (#302) Documentation friendly_type_of() provided (#22) Minor updates pull request review guidance added (#201, #292) Documentation singular versus plural function argument names added programming strategy vignette. Also documentation common arguments missing_value missing_values added. (#296) Documentation highlighting difference set_values_to keep_source_vars (#318) List common arguments updated (#306)","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-040","dir":"Changelog","previous_headings":"","what":"admiraldev 0.4.0","title":"admiraldev 0.4.0","text":"CRAN release: 2023-06-06","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-4-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.4.0","text":"New function assert_named() check elements argument named (#241) New function assert_expr_list() check argument list expressions (#241) Added Report bug link admiraldev website (#257)","code":""},{"path":[]},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-4-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.4.0","text":"assert_order_vars() deprecated favor assert_expr_list(). (#241) following functions deprecated previous admiral versions using next phase deprecation process: (#272) quo_c() quo_not_missing() replace_symbol_in_quo() quosures argument replaced expressions argument replace_values_by_names().","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-4-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.4.0","text":"deprecation strategy updated regarding unit tests deprecated functions/arguments phase 1. (#247) programming strategy updated regarding permitted values calling functions package dependencies (#72, #253)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-030","dir":"Changelog","previous_headings":"","what":"admiraldev 0.3.0","title":"admiraldev 0.3.0","text":"CRAN release: 2023-03-06","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-3-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.3.0","text":"New function process_set_values_to() creating variables specified set_value_to argument catching errors (#70)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-0-3-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 0.3.0","text":"Using testthat3e (testthat 3rd edition) unit testing. stricter messages must addressed deprecated functions throw errors. (#230) Slight boost test coverage dev_utilities (#102) Fix datatable styling documentation (#197) assert_character_vector() function gained named argument check elements vector named. (#70) assert_list_of() function gained named argument check elements list named. (#203) quote_fun argument enumerate() extended NULL can specified request quoting elements. (#203) assert_list_of() function enhanced also considers type element, e.g., check value list symbols. (#208)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-3-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.3.0","text":"default value optional argument assert_date_vector(), assert_list_of(), assert_s3_class() changed TRUE FALSE make default behavior consistent. (#87) quo_c() replace_symbol_in_quo() quosures argument get_source_vars(), replace_values_by_names(), vars2chr()","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-3-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.3.0","text":"New section programming strategy regarding comments (#71) Removed requirement add @author tags code scripts programming strategy, tracking authors DESCRIPTION file. Authors removed function documentation line update. (#206, #210) Removed -boarding Issue Template (#225) Increased clarity scope package (#232)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-020","dir":"Changelog","previous_headings":"","what":"admiraldev 0.2.0","title":"admiraldev 0.2.0","text":"CRAN release: 2022-11-30","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-2-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.2.0","text":"Developer addin formatting tests admiral programming standards (#73) New functions replace_symbol_in_quo() add_suffix_to_vars() (#106) New function assert_atomic_vector() (#98) New keyword/family create_aux functions creating auxiliary datasets (#126) New function assert_date_vector() (#129) New function assert_same_type() (#176) Remove dependency {assertthat} (#149) Test coverage admiraldev increased 45% approximately 100% (#94, #95, #96, #98, #101, #103) Environment objects consolidated single admiraldev_environment object R/admiraldev_environment.R. (#179)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-0-2-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 0.2.0","text":"expect_names argument added assert_vars() check variables named (#117) Remove dplyr function exports migration user facing function negate_vars() admiral (#83)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-2-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.2.0","text":"longer compatible admiral (<0.9)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-2-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.2.0","text":"New vignette package release strategy (#79) Updated multiple roxygen headers (#116, #133, #134, #141, #145, #172) Description admiral options work certain function inputs, .e subject_keys (#133)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"various-0-2-0","dir":"Changelog","previous_headings":"","what":"Various","title":"admiraldev 0.2.0","text":"PR Checklist Template updated (#172) New authors/contributors (#158)","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"admiraldev-010","dir":"Changelog","previous_headings":"","what":"admiraldev 0.1.0","title":"admiraldev 0.1.0","text":"CRAN release: 2022-08-26","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"new-features-0-1-0","dir":"Changelog","previous_headings":"","what":"New Features","title":"admiraldev 0.1.0","text":"Developer specific functions brought admiral Developer specific vignettes brought admiral New admiraldev website created","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"updates-of-existing-functions-0-1-0","dir":"Changelog","previous_headings":"","what":"Updates of Existing Functions","title":"admiraldev 0.1.0","text":"NA","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"breaking-changes-0-1-0","dir":"Changelog","previous_headings":"","what":"Breaking Changes","title":"admiraldev 0.1.0","text":"NA","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"documentation-0-1-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"admiraldev 0.1.0","text":"NA","code":""},{"path":"https://pharmaverse.github.io/admiraldev/dev/news/index.html","id":"various-0-1-0","dir":"Changelog","previous_headings":"","what":"Various","title":"admiraldev 0.1.0","text":"NA","code":""}]