From f25e659bae94c95a3c2970e91a8ae75ab17e398d Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 10:09:44 -0400 Subject: [PATCH 01/46] bug fix tidyselect for validation steps inside serially() --- R/utils.R | 34 +++++++++++--------- tests/testthat/test-tidyselect_integration.R | 34 ++++++++++++++++++++ 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/R/utils.R b/R/utils.R index 70361ff64..cf77f37b8 100644 --- a/R/utils.R +++ b/R/utils.R @@ -263,25 +263,27 @@ resolve_columns_internal <- function(x, var_expr, preconditions) { tbl <- apply_preconditions(tbl = tbl, preconditions = preconditions) } - # Revised column selection logic - ## Special case `vars()`-expression for backwards compatibility - if (rlang::quo_is_call(var_expr, "vars")) { - cols <- rlang::call_args(var_expr) - if (rlang::is_empty(tbl)) { - # Special-case `serially()` - just deparse elements and bypass tidyselect - column <- vapply(cols, rlang::as_name, character(1), - USE.NAMES = FALSE) + # Special case `serially()`: just deparse elements and bypass tidyselect + if (rlang::is_empty(tbl)) { + var_expr <- rlang::quo_get_expr(var_expr) + if (rlang::is_symbol(var_expr) || rlang::is_scalar_character(var_expr)) { + column <- rlang::as_name(var_expr) } else { - # Convert to the idiomatic `c()`-expr - col_c_expr <- rlang::call2("c", !!!cols) - column <- tidyselect::eval_select(col_c_expr, tbl) - column <- names(column) + cols <- rlang::call_args(var_expr) + column <- vapply(cols, rlang::as_name, character(1), USE.NAMES = FALSE) } - } else { - ## Else, assume that the user supplied a valid tidyselect expression - column <- tidyselect::eval_select(var_expr, tbl) - column <- names(column) + return(column) } + # Special case `vars()`-expression for backwards compatibility + if (rlang::quo_is_call(var_expr, "vars")) { + # Convert to the idiomatic `c()`-expr + c_expr <- rlang::call2("c", !!!rlang::call_args(var_expr)) + var_expr <- rlang::quo_set_expr(var_expr, c_expr) + } + + # Proceed with tidyselect + column <- tidyselect::eval_select(var_expr, tbl) + column <- names(column) if (length(column) < 1) { column <- NA_character_ diff --git a/tests/testthat/test-tidyselect_integration.R b/tests/testthat/test-tidyselect_integration.R index 2e24f7ac4..feb1d5569 100644 --- a/tests/testthat/test-tidyselect_integration.R +++ b/tests/testthat/test-tidyselect_integration.R @@ -146,3 +146,37 @@ test_that("'NULL = select everything' behavior in rows_*() validation functions" expect_equal(nrow(df_interrogated$validation_set), 2L) }) + +test_that("c()-expr works for serially", { + + # Example from `serially()` docs + tbl <- + dplyr::tibble( + a = c(5, 2, 6), + b = c(6, 4, 9), + c = c(1, 2, 3) + ) + agent_1 <- + create_agent(tbl = tbl) %>% + serially( + ~ test_col_is_numeric(., columns = vars(a, b)), + ~ test_col_vals_not_null(., columns = vars(a, b)), + ~ col_vals_gt(., columns = vars(b), value = vars(a)) + ) %>% + interrogate() + expect_no_error({ + agent_1_c <- + create_agent(tbl = tbl) %>% + serially( + ~ test_col_is_numeric(., columns = c(a, b)), + ~ test_col_vals_not_null(., columns = c(a, b)), + ~ col_vals_gt(., columns = b, value = vars(a)) + ) %>% + interrogate() + }) + expect_identical( + get_agent_report(agent_1, display_table = FALSE)$n_pass, + get_agent_report(agent_1_c, display_table = FALSE)$n_pass + ) + +}) From 7f91c6158078125f7d4ab85dffb3be92f9e9451d Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 10:17:42 -0400 Subject: [PATCH 02/46] first pass of vars()-stripping in examples --- R/action_levels.R | 14 ++++++------ R/all_passed.R | 6 ++--- R/col_exists.R | 10 ++++---- R/col_is_character.R | 10 ++++---- R/col_is_date.R | 10 ++++---- R/col_is_factor.R | 10 ++++---- R/col_is_integer.R | 10 ++++---- R/col_is_logical.R | 10 ++++---- R/col_is_numeric.R | 10 ++++---- R/col_is_posix.R | 10 ++++---- R/col_vals_between.R | 12 +++++----- R/col_vals_decreasing.R | 10 ++++---- R/col_vals_equal.R | 10 ++++---- R/col_vals_gt.R | 10 ++++---- R/col_vals_gte.R | 10 ++++---- R/col_vals_in_set.R | 10 ++++---- R/col_vals_increasing.R | 10 ++++---- R/col_vals_lt.R | 10 ++++---- R/col_vals_lte.R | 10 ++++---- R/col_vals_make_set.R | 10 ++++---- R/col_vals_make_subset.R | 10 ++++---- R/col_vals_not_between.R | 12 +++++----- R/col_vals_not_equal.R | 10 ++++---- R/col_vals_not_in_set.R | 10 ++++---- R/col_vals_not_null.R | 10 ++++---- R/col_vals_null.R | 10 ++++---- R/col_vals_regex.R | 10 ++++---- R/col_vals_within_spec.R | 10 ++++---- R/conjointly.R | 38 +++++++++++++++---------------- R/create_agent.R | 10 ++++---- R/create_multiagent.R | 4 ++-- R/draft_validation.R | 46 ++++++++++++++++++------------------- R/get_agent_report.R | 2 +- R/get_agent_x_list.R | 4 ++-- R/get_data_extracts.R | 2 +- R/get_multiagent_report.R | 20 ++++++++-------- R/get_sundered_data.R | 4 ++-- R/incorporate.R | 2 +- R/info_add.R | 6 ++--- R/interrogate.R | 2 +- R/logging.R | 4 ++-- R/object_ops.R | 28 +++++++++++------------ R/remove_deactivate.R | 12 +++++----- R/rows_complete.R | 10 ++++---- R/rows_distinct.R | 10 ++++---- R/serially.R | 48 +++++++++++++++++++-------------------- R/table_transformers.R | 23 +++++++++---------- R/tbl_from_file.R | 4 ++-- R/tbl_store.R | 2 +- R/write_testthat_file.R | 26 ++++++++++----------- R/yaml_read_agent.R | 16 ++++++------- R/yaml_write.R | 12 +++++----- 52 files changed, 309 insertions(+), 310 deletions(-) diff --git a/R/action_levels.R b/R/action_levels.R index 2b90ca6cb..484442540 100644 --- a/R/action_levels.R +++ b/R/action_levels.R @@ -154,10 +154,10 @@ #' actions = al #' ) %>% #' col_vals_gt( -#' columns = vars(a), value = 2 +#' columns = a, value = 2 #' ) %>% #' col_vals_lt( -#' columns = vars(d), value = 20000 +#' columns = d, value = 20000 #' ) %>% #' interrogate() #' ``` @@ -188,11 +188,11 @@ #' actions = al #' ) %>% #' col_vals_gt( -#' columns = vars(a), value = 2, +#' columns = a, value = 2, #' actions = warn_on_fail(warn_at = 0.5) #' ) %>% #' col_vals_lt( -#' columns = vars(d), value = 20000 +#' columns = d, value = 20000 #' ) %>% #' interrogate() #' ``` @@ -220,7 +220,7 @@ #' ```r #' small_table %>% #' col_vals_gt( -#' columns = vars(a), value = 2, +#' columns = a, value = 2, #' actions = warn_on_fail(warn_at = 2) #' ) #' ``` @@ -256,7 +256,7 @@ #' #' ```r #' small_table %>% -#' col_vals_gt(columns = vars(a), value = 2) +#' col_vals_gt(columns = a, value = 2) #' ``` #' #' ``` @@ -273,7 +273,7 @@ #' ```r #' small_table %>% #' col_vals_gt( -#' columns = vars(a), value = 2, +#' columns = a, value = 2, #' actions = stop_on_fail(stop_at = 1) #' ) #' ``` diff --git a/R/all_passed.R b/R/all_passed.R index d28b3ee3f..9bd3d292f 100644 --- a/R/all_passed.R +++ b/R/all_passed.R @@ -77,9 +77,9 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_gt(columns = vars(a), value = 3) %>% -#' col_vals_lte(columns = vars(a), value = 10) %>% -#' col_vals_increasing(columns = vars(a)) %>% +#' col_vals_gt(columns = a, value = 3) %>% +#' col_vals_lte(columns = a, value = 10) %>% +#' col_vals_increasing(columns = a) %>% #' interrogate() #' ``` #' diff --git a/R/col_exists.R b/R/col_exists.R index fe214ef5a..f63c07eaa 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -113,7 +113,7 @@ #' ```r #' agent %>% #' col_exists( -#' columns = vars(a), +#' columns = a, #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `col_exists()` step.", #' active = FALSE @@ -164,7 +164,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_exists(columns = vars(a)) %>% +#' col_exists(columns = a) %>% #' interrogate() #' ``` #' @@ -185,7 +185,7 @@ #' The behavior of side effects can be customized with the `actions` option. #' #' ```{r} -#' tbl %>% col_exists(columns = vars(a)) +#' tbl %>% col_exists(columns = a) #' ``` #' #' ## C: Using the expectation function @@ -194,7 +194,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_exists(tbl, columns = vars(a)) +#' expect_col_exists(tbl, columns = a) #' ``` #' #' ## D: Using the test function @@ -203,7 +203,7 @@ #' us. #' #' ```{r} -#' tbl %>% test_col_exists(columns = vars(a)) +#' tbl %>% test_col_exists(columns = a) #' ``` #' #' @family validation functions diff --git a/R/col_is_character.R b/R/col_is_character.R index e3bae6a00..23f9b7827 100644 --- a/R/col_is_character.R +++ b/R/col_is_character.R @@ -108,7 +108,7 @@ #' ```r #' agent %>% #' col_is_character( -#' columns = vars(a), +#' columns = a, #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `col_is_character()` step.", #' active = FALSE @@ -159,7 +159,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_is_character(columns = vars(b)) %>% +#' col_is_character(columns = b) %>% #' interrogate() #' ``` #' @@ -181,7 +181,7 @@ #' #' ```{r} #' tbl %>% -#' col_is_character(columns = vars(b)) %>% +#' col_is_character(columns = b) %>% #' dplyr::slice(1:5) #' ``` #' @@ -191,7 +191,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_is_character(tbl, columns = vars(b)) +#' expect_col_is_character(tbl, columns = b) #' ``` #' #' ## D: Using the test function @@ -200,7 +200,7 @@ #' us. #' #' ```{r} -#' tbl %>% test_col_is_character(columns = vars(b)) +#' tbl %>% test_col_is_character(columns = b) #' ``` #' #' @family validation functions diff --git a/R/col_is_date.R b/R/col_is_date.R index 3d51e7961..c49dfb475 100644 --- a/R/col_is_date.R +++ b/R/col_is_date.R @@ -108,7 +108,7 @@ #' ```r #' agent %>% #' col_is_date( -#' columns = vars(a), +#' columns = a, #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `col_is_date()` step.", #' active = FALSE @@ -151,7 +151,7 @@ #' ```r #' agent <- #' create_agent(tbl = small_table) %>% -#' col_is_date(columns = vars(date)) %>% +#' col_is_date(columns = date) %>% #' interrogate() #' ``` #' @@ -173,7 +173,7 @@ #' #' ```{r} #' small_table %>% -#' col_is_date(columns = vars(date)) %>% +#' col_is_date(columns = date) %>% #' dplyr::slice(1:5) #' ``` #' @@ -183,7 +183,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_is_date(small_table, columns = vars(date)) +#' expect_col_is_date(small_table, columns = date) #' ``` #' #' ## D: Using the test function @@ -192,7 +192,7 @@ #' us. #' #' ```{r} -#' small_table %>% test_col_is_date(columns = vars(date)) +#' small_table %>% test_col_is_date(columns = date) #' ``` #' #' @family validation functions diff --git a/R/col_is_factor.R b/R/col_is_factor.R index 1ad7ca584..8356e098a 100644 --- a/R/col_is_factor.R +++ b/R/col_is_factor.R @@ -108,7 +108,7 @@ #' ```r #' agent %>% #' col_is_factor( -#' columns = vars(a), +#' columns = a, #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `col_is_factor()` step.", #' active = FALSE @@ -157,7 +157,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_is_factor(columns = vars(f)) %>% +#' col_is_factor(columns = f) %>% #' interrogate() #' ``` #' @@ -179,7 +179,7 @@ #' #' ```{r} #' tbl %>% -#' col_is_factor(columns = vars(f)) %>% +#' col_is_factor(columns = f) %>% #' dplyr::slice(1:5) #' ``` #' @@ -189,7 +189,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_is_factor(tbl, vars(f)) +#' expect_col_is_factor(tbl, f) #' ``` #' #' ## D: Using the test function @@ -198,7 +198,7 @@ #' us. #' #' ```{r} -#' tbl %>% test_col_is_factor(columns = vars(f)) +#' tbl %>% test_col_is_factor(columns = f) #' ``` #' #' @family validation functions diff --git a/R/col_is_integer.R b/R/col_is_integer.R index 240b4fed4..478f5908b 100644 --- a/R/col_is_integer.R +++ b/R/col_is_integer.R @@ -108,7 +108,7 @@ #' ```r #' agent %>% #' col_is_integer( -#' columns = vars(a), +#' columns = a, #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `col_is_integer()` step.", #' active = FALSE @@ -157,7 +157,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_is_integer(columns = vars(b)) %>% +#' col_is_integer(columns = b) %>% #' interrogate() #' ``` #' @@ -178,7 +178,7 @@ #' behavior of side effects can be customized with the `actions` option. #' #' ```{r} -#' tbl %>% col_is_integer(columns = vars(b)) +#' tbl %>% col_is_integer(columns = b) #' ``` #' #' ## C: Using the expectation function @@ -187,7 +187,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_is_integer(tbl, columns = vars(b)) +#' expect_col_is_integer(tbl, columns = b) #' ``` #' #' ## D: Using the test function @@ -196,7 +196,7 @@ #' us. #' #' ```{r} -#' tbl %>% test_col_is_integer(columns = vars(b)) +#' tbl %>% test_col_is_integer(columns = b) #' ``` #' #' @family validation functions diff --git a/R/col_is_logical.R b/R/col_is_logical.R index ccfe8631f..40f757f03 100644 --- a/R/col_is_logical.R +++ b/R/col_is_logical.R @@ -108,7 +108,7 @@ #' ```r #' agent %>% #' col_is_logical( -#' columns = vars(a), +#' columns = a, #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `col_is_logical()` step.", #' active = FALSE @@ -152,7 +152,7 @@ #' ```r #' agent <- #' create_agent(tbl = small_table) %>% -#' col_is_logical(columns = vars(e)) %>% +#' col_is_logical(columns = e) %>% #' interrogate() #' ``` #' @@ -174,7 +174,7 @@ #' #' ```{r} #' small_table %>% -#' col_is_logical(columns = vars(e)) %>% +#' col_is_logical(columns = e) %>% #' dplyr::slice(1:5) #' ``` #' @@ -184,7 +184,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_is_logical(small_table, columns = vars(e)) +#' expect_col_is_logical(small_table, columns = e) #' ``` #' #' ## D: Using the test function @@ -193,7 +193,7 @@ #' us. #' #' ```{r} -#' small_table %>% test_col_is_logical(columns = vars(e)) +#' small_table %>% test_col_is_logical(columns = e) #' ``` #' #' @family validation functions diff --git a/R/col_is_numeric.R b/R/col_is_numeric.R index c74fec3ea..ade0fb911 100644 --- a/R/col_is_numeric.R +++ b/R/col_is_numeric.R @@ -108,7 +108,7 @@ #' ```r #' agent %>% #' col_is_numeric( -#' columns = vars(a), +#' columns = a, #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `col_is_numeric()` step.", #' active = FALSE @@ -152,7 +152,7 @@ #' ```r #' agent <- #' create_agent(tbl = small_table) %>% -#' col_is_numeric(columns = vars(d)) %>% +#' col_is_numeric(columns = d) %>% #' interrogate() #' ``` #' @@ -174,7 +174,7 @@ #' #' ```{r} #' small_table %>% -#' col_is_numeric(columns = vars(d)) %>% +#' col_is_numeric(columns = d) %>% #' dplyr::slice(1:5) #' ``` #' @@ -184,7 +184,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_is_numeric(small_table, columns = vars(d)) +#' expect_col_is_numeric(small_table, columns = d) #' ``` #' #' ## D: Using the test function @@ -193,7 +193,7 @@ #' us. #' #' ```{r} -#' small_table %>% test_col_is_numeric(columns = vars(d)) +#' small_table %>% test_col_is_numeric(columns = d) #' ``` #' #' @family validation functions diff --git a/R/col_is_posix.R b/R/col_is_posix.R index 827922af2..9d5ce427b 100644 --- a/R/col_is_posix.R +++ b/R/col_is_posix.R @@ -108,7 +108,7 @@ #' ```r #' agent %>% #' col_is_posix( -#' columns = vars(a), +#' columns = a, #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `col_is_posix()` step.", #' active = FALSE @@ -152,7 +152,7 @@ #' ```r #' agent <- #' create_agent(tbl = small_table) %>% -#' col_is_posix(columns = vars(date_time)) %>% +#' col_is_posix(columns = date_time) %>% #' interrogate() #' ``` #' @@ -174,7 +174,7 @@ #' #' ```{r} #' small_table %>% -#' col_is_posix(columns = vars(date_time)) %>% +#' col_is_posix(columns = date_time) %>% #' dplyr::slice(1:5) #' ``` #' @@ -184,7 +184,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_is_posix(small_table, columns = vars(date_time)) +#' expect_col_is_posix(small_table, columns = date_time) #' ``` #' #' ## D: Using the test function @@ -193,7 +193,7 @@ #' us. #' #' ```{r} -#' small_table %>% test_col_is_posix(columns = vars(date_time)) +#' small_table %>% test_col_is_posix(columns = date_time) #' ``` #' #' @family validation functions diff --git a/R/col_vals_between.R b/R/col_vals_between.R index 62191977d..962dd8db2 100644 --- a/R/col_vals_between.R +++ b/R/col_vals_between.R @@ -199,7 +199,7 @@ #' ```r #' agent %>% #' col_vals_between( -#' columns = vars(a), +#' columns = a, #' left = 1, #' right = 2, #' inclusive = c(TRUE, FALSE), @@ -260,7 +260,7 @@ #' agent <- #' create_agent(tbl = small_table) %>% #' col_vals_between( -#' columns = vars(c), +#' columns = c, #' left = 1, right = 9, #' na_pass = TRUE #' ) %>% @@ -286,7 +286,7 @@ #' ```{r} #' small_table %>% #' col_vals_between( -#' columns = vars(c), +#' columns = c, #' left = 1, right = 9, #' na_pass = TRUE #' ) %>% @@ -300,7 +300,7 @@ #' #' ```r #' expect_col_vals_between( -#' small_table, columns = vars(c), +#' small_table, columns = c, #' left = 1, right = 9, #' na_pass = TRUE #' ) @@ -314,7 +314,7 @@ #' ```{r} #' small_table %>% #' test_col_vals_between( -#' columns = vars(c), +#' columns = c, #' left = 1, right = 9, #' na_pass = TRUE #' ) @@ -331,7 +331,7 @@ #' ```{r} #' small_table %>% #' test_col_vals_between( -#' columns = vars(c), left = 1, right = 9, +#' columns = c, left = 1, right = 9, #' inclusive = c(TRUE, FALSE), #' na_pass = TRUE #' ) diff --git a/R/col_vals_decreasing.R b/R/col_vals_decreasing.R index 4fee5e15f..c498dc1da 100644 --- a/R/col_vals_decreasing.R +++ b/R/col_vals_decreasing.R @@ -189,7 +189,7 @@ #' ```r #' agent %>% #' col_vals_decreasing( -#' columns = vars(a), +#' columns = a, #' allow_stationary = TRUE, #' increasing_tol = 0.5, #' na_pass = TRUE, @@ -259,7 +259,7 @@ #' agent <- #' create_agent(tbl = game_revenue_2) %>% #' col_vals_decreasing( -#' columns = vars(time_left), +#' columns = time_left, #' allow_stationary = TRUE #' ) %>% #' interrogate() @@ -284,7 +284,7 @@ #' ```{r} #' game_revenue_2 %>% #' col_vals_decreasing( -#' columns = vars(time_left), +#' columns = time_left, #' allow_stationary = TRUE #' ) %>% #' dplyr::select(time_left) %>% @@ -300,7 +300,7 @@ #' ```r #' expect_col_vals_decreasing( #' game_revenue_2, -#' columns = vars(time_left), +#' columns = time_left, #' allow_stationary = TRUE #' ) #' ``` @@ -313,7 +313,7 @@ #' ```{r} #' game_revenue_2 %>% #' test_col_vals_decreasing( -#' columns = vars(time_left), +#' columns = time_left, #' allow_stationary = TRUE #' ) #' ``` diff --git a/R/col_vals_equal.R b/R/col_vals_equal.R index 2c30d19d7..33bfa8c8e 100644 --- a/R/col_vals_equal.R +++ b/R/col_vals_equal.R @@ -175,7 +175,7 @@ #' ```r #' agent %>% #' col_vals_equal( -#' columns = vars(a), +#' columns = a, #' value = 1, #' na_pass = TRUE, #' preconditions = ~ . %>% dplyr::filter(a < 10), @@ -238,7 +238,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_equal(columns = vars(a), value = 5) %>% +#' col_vals_equal(columns = a, value = 5) %>% #' interrogate() #' ``` #' @@ -260,7 +260,7 @@ #' #' ```{r} #' tbl %>% -#' col_vals_equal(columns = vars(a), value = 5) %>% +#' col_vals_equal(columns = a, value = 5) %>% #' dplyr::pull(a) #' ``` #' @@ -270,7 +270,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_equal(tbl, columns = vars(a), value = 5) +#' expect_col_vals_equal(tbl, columns = a, value = 5) #' ``` #' #' ## D: Using the test function @@ -279,7 +279,7 @@ #' us. #' #' ```{r} -#' test_col_vals_equal(tbl, columns = vars(a), value = 5) +#' test_col_vals_equal(tbl, columns = a, value = 5) #' ``` #' #' @family validation functions diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index 0fe3c306f..031d6f0d0 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -297,7 +297,7 @@ #' ```r #' agent %>% #' col_vals_gt( -#' columns = vars(a), +#' columns = a, #' value = 1, #' na_pass = TRUE, #' preconditions = ~ . %>% dplyr::filter(a < 10), @@ -360,7 +360,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_gt(columns = vars(a), value = 4) %>% +#' col_vals_gt(columns = a, value = 4) %>% #' interrogate() #' ``` #' @@ -381,7 +381,7 @@ #' behavior of side effects can be customized with the `actions` option. #' #' ```{r} -#' tbl %>% col_vals_gt(columns = vars(a), value = 4) +#' tbl %>% col_vals_gt(columns = a, value = 4) #' ``` #' #' ## C: Using the expectation function @@ -390,7 +390,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_gt(tbl, columns = vars(a), value = 4) +#' expect_col_vals_gt(tbl, columns = a, value = 4) #' ``` #' #' ## D: Using the test function @@ -399,7 +399,7 @@ #' us. #' #' ```{r} -#' test_col_vals_gt(tbl, columns = vars(a), value = 4) +#' test_col_vals_gt(tbl, columns = a, value = 4) #' ``` #' #' @family validation functions diff --git a/R/col_vals_gte.R b/R/col_vals_gte.R index 78445b68b..5030c89eb 100644 --- a/R/col_vals_gte.R +++ b/R/col_vals_gte.R @@ -176,7 +176,7 @@ #' ```r #' agent %>% #' col_vals_gte( -#' columns = vars(a), +#' columns = a, #' value = 1, #' na_pass = TRUE, #' preconditions = ~ . %>% dplyr::filter(a < 10), @@ -239,7 +239,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_gte(columns = vars(a), value = 5) %>% +#' col_vals_gte(columns = a, value = 5) %>% #' interrogate() #' ``` #' @@ -260,7 +260,7 @@ #' behavior of side effects can be customized with the `actions` option. #' #' ```{r} -#' tbl %>% col_vals_gte(columns = vars(a), value = 5) +#' tbl %>% col_vals_gte(columns = a, value = 5) #' ``` #' #' ## C: Using the expectation function @@ -269,7 +269,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_gte(tbl, columns = vars(a), value = 5) +#' expect_col_vals_gte(tbl, columns = a, value = 5) #' ``` #' #' ## D: Using the test function @@ -278,7 +278,7 @@ #' us. #' #' ```{r} -#' test_col_vals_gte(tbl, columns = vars(a), value = 5) +#' test_col_vals_gte(tbl, columns = a, value = 5) #' ``` #' #' @family validation functions diff --git a/R/col_vals_in_set.R b/R/col_vals_in_set.R index 2abf8da8b..70fbda20a 100644 --- a/R/col_vals_in_set.R +++ b/R/col_vals_in_set.R @@ -166,7 +166,7 @@ #' ```r #' agent %>% #' col_vals_in_set( -#' columns = vars(a), +#' columns = a, #' set = c(1, 2, 3, 4), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), @@ -222,7 +222,7 @@ #' agent <- #' create_agent(tbl = small_table) %>% #' col_vals_in_set( -#' columns = vars(f), set = c("low", "mid", "high") +#' columns = f, set = c("low", "mid", "high") #' ) %>% #' interrogate() #' ``` @@ -246,7 +246,7 @@ #' ```{r} #' small_table %>% #' col_vals_in_set( -#' columns = vars(f), set = c("low", "mid", "high") +#' columns = f, set = c("low", "mid", "high") #' ) %>% #' dplyr::pull(f) %>% #' unique() @@ -260,7 +260,7 @@ #' ```r #' expect_col_vals_in_set( #' small_table, -#' columns = vars(f), set = c("low", "mid", "high") +#' columns = f, set = c("low", "mid", "high") #' ) #' ``` #' @@ -272,7 +272,7 @@ #' ```{r} #' small_table %>% #' test_col_vals_in_set( -#' columns = vars(f), set = c("low", "mid", "high") +#' columns = f, set = c("low", "mid", "high") #' ) #' ``` #' diff --git a/R/col_vals_increasing.R b/R/col_vals_increasing.R index 40f23a96b..8c6501d8a 100644 --- a/R/col_vals_increasing.R +++ b/R/col_vals_increasing.R @@ -189,7 +189,7 @@ #' ```r #' agent %>% #' col_vals_increasing( -#' columns = vars(a), +#' columns = a, #' allow_stationary = TRUE, #' decreasing_tol = 0.5, #' na_pass = TRUE, @@ -247,7 +247,7 @@ #' agent <- #' create_agent(tbl = game_revenue) %>% #' col_vals_increasing( -#' columns = vars(session_start), +#' columns = session_start, #' allow_stationary = TRUE #' ) %>% #' interrogate() @@ -272,7 +272,7 @@ #' ```{r} #' game_revenue %>% #' col_vals_increasing( -#' columns = vars(session_start), +#' columns = session_start, #' allow_stationary = TRUE #' ) %>% #' dplyr::select(session_start) %>% @@ -288,7 +288,7 @@ #' ```r #' expect_col_vals_increasing( #' game_revenue, -#' columns = vars(session_start), +#' columns = session_start, #' allow_stationary = TRUE #' ) #' ``` @@ -301,7 +301,7 @@ #' ```{r} #' game_revenue %>% #' test_col_vals_increasing( -#' columns = vars(session_start), +#' columns = session_start, #' allow_stationary = TRUE #' ) #' ``` diff --git a/R/col_vals_lt.R b/R/col_vals_lt.R index d4ffd9394..554d00f42 100644 --- a/R/col_vals_lt.R +++ b/R/col_vals_lt.R @@ -176,7 +176,7 @@ #' ```r #' agent %>% #' col_vals_lt( -#' columns = vars(a), +#' columns = a, #' value = 1, #' na_pass = TRUE, #' preconditions = ~ . %>% dplyr::filter(a < 10), @@ -239,7 +239,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_lt(columns = vars(c), value = 5) %>% +#' col_vals_lt(columns = c, value = 5) %>% #' interrogate() #' ``` #' @@ -261,7 +261,7 @@ #' #' ```{r} #' tbl %>% -#' col_vals_lt(columns = vars(c), value = 5) %>% +#' col_vals_lt(columns = c, value = 5) %>% #' dplyr::pull(c) #' ``` #' @@ -271,7 +271,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_lt(tbl, columns = vars(c), value = 5) +#' expect_col_vals_lt(tbl, columns = c, value = 5) #' ``` #' #' ## D: Using the test function @@ -280,7 +280,7 @@ #' us. #' #' ```{r} -#' test_col_vals_lt(tbl, columns = vars(c), value = 5) +#' test_col_vals_lt(tbl, columns = c, value = 5) #' ``` #' #' @family validation functions diff --git a/R/col_vals_lte.R b/R/col_vals_lte.R index 016741ca7..18eab3b3e 100644 --- a/R/col_vals_lte.R +++ b/R/col_vals_lte.R @@ -177,7 +177,7 @@ #' ```r #' agent %>% #' col_vals_lte( -#' columns = vars(a), +#' columns = a, #' value = 1, #' na_pass = TRUE, #' preconditions = ~ . %>% dplyr::filter(a < 10), @@ -240,7 +240,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_lte(columns = vars(c), value = 4) %>% +#' col_vals_lte(columns = c, value = 4) %>% #' interrogate() #' ``` #' @@ -262,7 +262,7 @@ #' #' ```{r} #' tbl %>% -#' col_vals_lte(columns = vars(c), value = 4) %>% +#' col_vals_lte(columns = c, value = 4) %>% #' dplyr::pull(c) #' ``` #' @@ -272,7 +272,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_lte(tbl, columns = vars(c), value = 4) +#' expect_col_vals_lte(tbl, columns = c, value = 4) #' ``` #' #' ## D: Using the test function @@ -281,7 +281,7 @@ #' us. #' #' ```{r} -#' test_col_vals_lte(tbl, columns = vars(c), value = 4) +#' test_col_vals_lte(tbl, columns = c, value = 4) #' ``` #' #' @family validation functions diff --git a/R/col_vals_make_set.R b/R/col_vals_make_set.R index 66132201f..716fe9dbb 100644 --- a/R/col_vals_make_set.R +++ b/R/col_vals_make_set.R @@ -170,7 +170,7 @@ #' ```r #' agent %>% #' col_vals_make_set( -#' columns = vars(a), +#' columns = a, #' set = c(1, 2, 3, 4), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), @@ -226,7 +226,7 @@ #' agent <- #' create_agent(tbl = small_table) %>% #' col_vals_make_set( -#' columns = vars(f), set = c("low", "mid", "high") +#' columns = f, set = c("low", "mid", "high") #' ) %>% #' interrogate() #' ``` @@ -250,7 +250,7 @@ #' ```{r} #' small_table %>% #' col_vals_make_set( -#' columns = vars(f), set = c("low", "mid", "high") +#' columns = f, set = c("low", "mid", "high") #' ) %>% #' dplyr::pull(f) %>% #' unique() @@ -264,7 +264,7 @@ #' ```r #' expect_col_vals_make_set( #' small_table, -#' columns = vars(f), set = c("low", "mid", "high") +#' columns = f, set = c("low", "mid", "high") #' ) #' ``` #' @@ -276,7 +276,7 @@ #' ```{r} #' small_table %>% #' test_col_vals_make_set( -#' columns = vars(f), set = c("low", "mid", "high") +#' columns = f, set = c("low", "mid", "high") #' ) #' ``` #' diff --git a/R/col_vals_make_subset.R b/R/col_vals_make_subset.R index 628548cc9..1772db9ee 100644 --- a/R/col_vals_make_subset.R +++ b/R/col_vals_make_subset.R @@ -166,7 +166,7 @@ #' ```r #' agent %>% #' col_vals_make_subset( -#' columns = vars(a), +#' columns = a, #' set = c(1, 2, 3, 4), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), @@ -223,7 +223,7 @@ #' agent <- #' create_agent(tbl = small_table) %>% #' col_vals_make_subset( -#' columns = vars(f), set = c("low", "high") +#' columns = f, set = c("low", "high") #' ) %>% #' interrogate() #' ``` @@ -247,7 +247,7 @@ #' ```{r} #' small_table %>% #' col_vals_make_subset( -#' columns = vars(f), set = c("low", "high") +#' columns = f, set = c("low", "high") #' ) %>% #' dplyr::pull(f) %>% #' unique() @@ -261,7 +261,7 @@ #' ```r #' expect_col_vals_make_subset( #' small_table, -#' columns = vars(f), set = c("low", "high") +#' columns = f, set = c("low", "high") #' ) #' ``` #' @@ -273,7 +273,7 @@ #' ```{r} #' small_table %>% #' test_col_vals_make_subset( -#' columns = vars(f), set = c("low", "high") +#' columns = f, set = c("low", "high") #' ) #' ``` #' diff --git a/R/col_vals_not_between.R b/R/col_vals_not_between.R index 8730e2da4..804ba3349 100644 --- a/R/col_vals_not_between.R +++ b/R/col_vals_not_between.R @@ -200,7 +200,7 @@ #' ```r #' agent %>% #' col_vals_not_between( -#' columns = vars(a), +#' columns = a, #' left = 1, #' right = 2, #' inclusive = c(TRUE, FALSE), @@ -262,7 +262,7 @@ #' agent <- #' create_agent(tbl = small_table) %>% #' col_vals_not_between( -#' columns = vars(c), +#' columns = c, #' left = 10, right = 20, #' na_pass = TRUE #' ) %>% @@ -288,7 +288,7 @@ #' ```{r} #' small_table %>% #' col_vals_not_between( -#' columns = vars(c), +#' columns = c, #' left = 10, right = 20, #' na_pass = TRUE #' ) %>% @@ -302,7 +302,7 @@ #' #' ```r #' expect_col_vals_not_between( -#' small_table, columns = vars(c), +#' small_table, columns = c, #' left = 10, right = 20, #' na_pass = TRUE #' ) @@ -316,7 +316,7 @@ #' ```{r} #' small_table %>% #' test_col_vals_not_between( -#' columns = vars(c), +#' columns = c, #' left = 10, right = 20, #' na_pass = TRUE #' ) @@ -333,7 +333,7 @@ #' ```{r} #' small_table %>% #' test_col_vals_not_between( -#' columns = vars(c), +#' columns = c, #' left = 9, right = 20, #' inclusive = c(FALSE, TRUE), #' na_pass = TRUE diff --git a/R/col_vals_not_equal.R b/R/col_vals_not_equal.R index 0ce95f453..369763aa4 100644 --- a/R/col_vals_not_equal.R +++ b/R/col_vals_not_equal.R @@ -174,7 +174,7 @@ #' ```r #' agent %>% #' col_vals_not_equal( -#' columns = vars(a), +#' columns = a, #' value = 1, #' na_pass = TRUE, #' preconditions = ~ . %>% dplyr::filter(a < 10), @@ -237,7 +237,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_not_equal(columns = vars(a), value = 6) %>% +#' col_vals_not_equal(columns = a, value = 6) %>% #' interrogate() #' ``` #' @@ -259,7 +259,7 @@ #' #' ```{r} #' tbl %>% -#' col_vals_not_equal(columns = vars(a), value = 6) %>% +#' col_vals_not_equal(columns = a, value = 6) %>% #' dplyr::pull(a) #' ``` #' @@ -269,7 +269,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_not_equal(tbl, columns = vars(a), value = 6) +#' expect_col_vals_not_equal(tbl, columns = a, value = 6) #' ``` #' #' ## D: Using the test function @@ -278,7 +278,7 @@ #' us. #' #' ```{r} -#' test_col_vals_not_equal(tbl, columns = vars(a), value = 6) +#' test_col_vals_not_equal(tbl, columns = a, value = 6) #' ``` #' #' @family validation functions diff --git a/R/col_vals_not_in_set.R b/R/col_vals_not_in_set.R index 1911f80ff..98b772197 100644 --- a/R/col_vals_not_in_set.R +++ b/R/col_vals_not_in_set.R @@ -166,7 +166,7 @@ #' ```r #' agent %>% #' col_vals_not_in_set( -#' columns = vars(a), +#' columns = a, #' set = c(1, 2, 3, 4), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), @@ -218,7 +218,7 @@ #' agent <- #' create_agent(tbl = small_table) %>% #' col_vals_not_in_set( -#' columns = vars(f), set = c("lows", "mids", "highs") +#' columns = f, set = c("lows", "mids", "highs") #' ) %>% #' interrogate() #' ``` @@ -242,7 +242,7 @@ #' ``` #' small_table %>% #' col_vals_not_in_set( -#' columns = vars(f), set = c("lows", "mids", "highs") +#' columns = f, set = c("lows", "mids", "highs") #' ) %>% #' dplyr::pull(f) %>% #' unique() @@ -256,7 +256,7 @@ #' ```r #' expect_col_vals_not_in_set( #' small_table, -#' columns = vars(f), set = c("lows", "mids", "highs") +#' columns = f, set = c("lows", "mids", "highs") #' ) #' ``` #' @@ -268,7 +268,7 @@ #' ```{r} #' small_table %>% #' test_col_vals_not_in_set( -#' columns = vars(f), set = c("lows", "mids", "highs") +#' columns = f, set = c("lows", "mids", "highs") #' ) #' ``` #' diff --git a/R/col_vals_not_null.R b/R/col_vals_not_null.R index fcd0735bf..0a655959d 100644 --- a/R/col_vals_not_null.R +++ b/R/col_vals_not_null.R @@ -160,7 +160,7 @@ #' ```r #' agent %>% #' col_vals_not_null( -#' columns = vars(a), +#' columns = a, #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -218,7 +218,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_not_null(columns = vars(b)) %>% +#' col_vals_not_null(columns = b) %>% #' interrogate() #' ``` #' @@ -240,7 +240,7 @@ #' #' ```{r} #' tbl %>% -#' col_vals_not_null(columns = vars(b)) %>% +#' col_vals_not_null(columns = b) %>% #' dplyr::pull(b) #' ``` #' @@ -250,7 +250,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_not_null(tbl, columns = vars(b)) +#' expect_col_vals_not_null(tbl, columns = b) #' ``` #' #' ## D: Using the test function @@ -259,7 +259,7 @@ #' us. #' #' ```{r} -#' tbl %>% test_col_vals_not_null(columns = vars(b)) +#' tbl %>% test_col_vals_not_null(columns = b) #' ``` #' #' @family validation functions diff --git a/R/col_vals_null.R b/R/col_vals_null.R index 2b1731de1..9d64b20d1 100644 --- a/R/col_vals_null.R +++ b/R/col_vals_null.R @@ -159,7 +159,7 @@ #' ```r #' agent %>% #' col_vals_null( -#' columns = vars(a), +#' columns = a, #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -217,7 +217,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' col_vals_null(columns = vars(c)) %>% +#' col_vals_null(columns = c) %>% #' interrogate() #' ``` #' @@ -239,7 +239,7 @@ #' #' ```{r} #' tbl %>% -#' col_vals_null(columns = vars(c)) %>% +#' col_vals_null(columns = c) %>% #' dplyr::pull(c) #' ``` #' @@ -249,7 +249,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_null(tbl, columns = vars(c)) +#' expect_col_vals_null(tbl, columns = c) #' ``` #' #' ## D: Using the test function @@ -258,7 +258,7 @@ #' us. #' #' ```{r} -#' tbl %>% test_col_vals_null(columns = vars(c)) +#' tbl %>% test_col_vals_null(columns = c) #' ``` #' #' @family validation functions diff --git a/R/col_vals_regex.R b/R/col_vals_regex.R index e107b2390..bd839f4bb 100644 --- a/R/col_vals_regex.R +++ b/R/col_vals_regex.R @@ -173,7 +173,7 @@ #' ``` #' agent %>% #' col_vals_regex( -#' columns = vars(a), +#' columns = a, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}", #' na_pass = TRUE, #' preconditions = ~ . %>% dplyr::filter(a < 10), @@ -233,7 +233,7 @@ #' ```r #' agent <- #' create_agent(tbl = small_table) %>% -#' col_vals_regex(columns = vars(b), regex = pattern) %>% +#' col_vals_regex(columns = b, regex = pattern) %>% #' interrogate() #' ``` #' @@ -255,7 +255,7 @@ #' #' ```{r} #' small_table %>% -#' col_vals_regex(columns = vars(b), regex = pattern) %>% +#' col_vals_regex(columns = b, regex = pattern) %>% #' dplyr::slice(1:5) #' ``` #' @@ -265,7 +265,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_col_vals_regex(small_table, columns = vars(b), regex = pattern) +#' expect_col_vals_regex(small_table, columns = b, regex = pattern) #' ``` #' #' ## D: Using the test function @@ -274,7 +274,7 @@ #' us. #' #' ```{r} -#' small_table %>% test_col_vals_regex(columns = vars(b), regex = pattern) +#' small_table %>% test_col_vals_regex(columns = b, regex = pattern) #' ``` #' #' @family validation functions diff --git a/R/col_vals_within_spec.R b/R/col_vals_within_spec.R index 36fc472a9..e915e81e4 100644 --- a/R/col_vals_within_spec.R +++ b/R/col_vals_within_spec.R @@ -223,7 +223,7 @@ #' ```r #' agent %>% #' col_vals_within_spec( -#' columns = vars(a), +#' columns = a, #' spec = "email", #' na_pass = TRUE, #' preconditions = ~ . %>% dplyr::filter(b < 10), @@ -282,7 +282,7 @@ #' agent <- #' create_agent(tbl = spec_slice) %>% #' col_vals_within_spec( -#' columns = vars(email_addresses), +#' columns = email_addresses, #' spec = "email" #' ) %>% #' interrogate() @@ -307,7 +307,7 @@ #' ```{r} #' spec_slice %>% #' col_vals_within_spec( -#' columns = vars(email_addresses), +#' columns = email_addresses, #' spec = "email" #' ) %>% #' dplyr::select(email_addresses) @@ -321,7 +321,7 @@ #' ```r #' expect_col_vals_within_spec( #' spec_slice, -#' columns = vars(email_addresses), +#' columns = email_addresses, #' spec = "email" #' ) #' ``` @@ -334,7 +334,7 @@ #' ```{r} #' spec_slice %>% #' test_col_vals_within_spec( -#' columns = vars(email_addresses), +#' columns = email_addresses, #' spec = "email" #' ) #' ``` diff --git a/R/conjointly.R b/R/conjointly.R index f2decc356..390a0ee2e 100644 --- a/R/conjointly.R +++ b/R/conjointly.R @@ -54,7 +54,7 @@ #' A collection one-sided formulas that consist of validation functions that #' validate row units (the `col_vals_*()` series), column existence #' ([col_exists()]), or column type (the `col_is_*()` series). An example of -#' this is `~ col_vals_gte(., vars(a), 5.5), ~ col_vals_not_null(., vars(b)`). +#' this is `~ col_vals_gte(., a, 5.5), ~ col_vals_not_null(., b`). #' #' @param .list *Alternative to `...`* #' @@ -186,9 +186,9 @@ #' ```r #' agent %>% #' conjointly( -#' ~ col_vals_lt(., columns = vars(a), value = 8), -#' ~ col_vals_gt(., columns = vars(c), value = vars(a)), -#' ~ col_vals_not_null(., columns = vars(b)), +#' ~ col_vals_lt(., columns = a, value = 8), +#' ~ col_vals_gt(., columns = c, value = vars(a)), +#' ~ col_vals_not_null(., columns = b), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -203,9 +203,9 @@ #' steps: #' - conjointly: #' fns: -#' - ~col_vals_lt(., columns = vars(a), value = 8) -#' - ~col_vals_gt(., columns = vars(c), value = vars(a)) -#' - ~col_vals_not_null(., columns = vars(b)) +#' - ~col_vals_lt(., columns = a, value = 8) +#' - ~col_vals_gt(., columns = c, value = vars(a)) +#' - ~col_vals_not_null(., columns = b) #' preconditions: ~. %>% dplyr::filter(a < 10) #' segments: b ~ c("group_1", "group_2") #' actions: @@ -252,9 +252,9 @@ #' agent <- #' create_agent(tbl = tbl) %>% #' conjointly( -#' ~ col_vals_lt(., columns = vars(a), value = 8), -#' ~ col_vals_gt(., columns = vars(c), value = vars(a)), -#' ~ col_vals_not_null(., columns = vars(b)) +#' ~ col_vals_lt(., columns = a, value = 8), +#' ~ col_vals_gt(., columns = c, value = vars(a)), +#' ~ col_vals_not_null(., columns = b) #' ) %>% #' interrogate() #' ``` @@ -283,9 +283,9 @@ #' ```{r} #' tbl %>% #' conjointly( -#' ~ col_vals_lt(., columns = vars(a), value = 8), -#' ~ col_vals_gt(., columns = vars(c), value = vars(a)), -#' ~ col_vals_not_null(., columns = vars(b)) +#' ~ col_vals_lt(., columns = a, value = 8), +#' ~ col_vals_gt(., columns = c, value = vars(a)), +#' ~ col_vals_not_null(., columns = b) #' ) #' ``` #' @@ -297,9 +297,9 @@ #' ```r #' expect_conjointly( #' tbl, -#' ~ col_vals_lt(., columns = vars(a), value = 8), -#' ~ col_vals_gt(., columns = vars(c), value = vars(a)), -#' ~ col_vals_not_null(., columns = vars(b)) +#' ~ col_vals_lt(., columns = a, value = 8), +#' ~ col_vals_gt(., columns = c, value = vars(a)), +#' ~ col_vals_not_null(., columns = b) #' ) #' ``` #' @@ -311,9 +311,9 @@ #' ```{r} #' tbl %>% #' test_conjointly( -#' ~ col_vals_lt(., columns = vars(a), value = 8), -#' ~ col_vals_gt(., columns = vars(c), value = vars(a)), -#' ~ col_vals_not_null(., columns = vars(b)) +#' ~ col_vals_lt(., columns = a, value = 8), +#' ~ col_vals_gt(., columns = c, value = vars(a)), +#' ~ col_vals_not_null(., columns = b) #' ) #' ``` #' diff --git a/R/create_agent.R b/R/create_agent.R index 2caed19f3..d344abc09 100644 --- a/R/create_agent.R +++ b/R/create_agent.R @@ -394,16 +394,16 @@ #' ```r #' agent <- #' agent %>% -#' col_exists(columns = vars(date, date_time)) %>% +#' col_exists(columns = date, date_time) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}" #' ) %>% #' rows_distinct() %>% -#' col_vals_gt(columns = vars(d), value = 100) %>% -#' col_vals_lte(columns = vars(c), value = 5) %>% +#' col_vals_gt(columns = d, value = 100) %>% +#' col_vals_lte(columns = c, value = 5) %>% #' col_vals_between( -#' columns = vars(c), +#' columns = c, #' left = vars(a), right = vars(d), #' na_pass = TRUE #' ) %>% diff --git a/R/create_multiagent.R b/R/create_multiagent.R index a2c225118..e1f9cfedc 100644 --- a/R/create_multiagent.R +++ b/R/create_multiagent.R @@ -107,7 +107,7 @@ #' tbl_name = "tbl_1", #' label = "Example table 1." #' ) %>% -#' col_vals_gt(columns = vars(a), value = 4) %>% +#' col_vals_gt(columns = a, value = 4) %>% #' interrogate() #' ``` #' @@ -120,7 +120,7 @@ #' tbl_name = "tbl_2", #' label = "Example table 2." #' ) %>% -#' col_is_character(columns = vars(b)) %>% +#' col_is_character(columns = b) %>% #' interrogate() #' ``` #' diff --git a/R/draft_validation.R b/R/draft_validation.R index 7a50189c1..627d6cf27 100644 --- a/R/draft_validation.R +++ b/R/draft_validation.R @@ -154,116 +154,116 @@ #' ) %>% #' # Expect that column `name` is of type: character #' col_is_character( -#' columns = vars(name) +#' columns = name #' ) %>% #' # Expect that column `year` is of type: numeric #' col_is_numeric( -#' columns = vars(year) +#' columns = year #' ) %>% #' # Expect that values in `year` should be between `1975` and `2020` #' col_vals_between( -#' columns = vars(year), +#' columns = year, #' left = 1975, #' right = 2020 #' ) %>% #' # Expect that column `month` is of type: numeric #' col_is_numeric( -#' columns = vars(month) +#' columns = month #' ) %>% #' # Expect that values in `month` should be between `1` and `12` #' col_vals_between( -#' columns = vars(month), +#' columns = month, #' left = 1, #' right = 12 #' ) %>% #' # Expect that column `day` is of type: integer #' col_is_integer( -#' columns = vars(day) +#' columns = day #' ) %>% #' # Expect that values in `day` should be between `1` and `31` #' col_vals_between( -#' columns = vars(day), +#' columns = day, #' left = 1, #' right = 31 #' ) %>% #' # Expect that column `hour` is of type: numeric #' col_is_numeric( -#' columns = vars(hour) +#' columns = hour #' ) %>% #' # Expect that values in `hour` should be between `0` and `23` #' col_vals_between( -#' columns = vars(hour), +#' columns = hour, #' left = 0, #' right = 23 #' ) %>% #' # Expect that column `lat` is of type: numeric #' col_is_numeric( -#' columns = vars(lat) +#' columns = lat #' ) %>% #' # Expect that values in `lat` should be between `-90` and `90` #' col_vals_between( -#' columns = vars(lat), +#' columns = lat, #' left = -90, #' right = 90 #' ) %>% #' # Expect that column `long` is of type: numeric #' col_is_numeric( -#' columns = vars(long) +#' columns = long #' ) %>% #' # Expect that values in `long` should be between `-180` and `180` #' col_vals_between( -#' columns = vars(long), +#' columns = long, #' left = -180, #' right = 180 #' ) %>% #' # Expect that column `status` is of type: character #' col_is_character( -#' columns = vars(status) +#' columns = status #' ) %>% #' # Expect that column `category` is of type: factor #' col_is_factor( -#' columns = vars(category) +#' columns = category #' ) %>% #' # Expect that column `wind` is of type: integer #' col_is_integer( -#' columns = vars(wind) +#' columns = wind #' ) %>% #' # Expect that values in `wind` should be between `10` and `160` #' col_vals_between( -#' columns = vars(wind), +#' columns = wind, #' left = 10, #' right = 160 #' ) %>% #' # Expect that column `pressure` is of type: integer #' col_is_integer( -#' columns = vars(pressure) +#' columns = pressure #' ) %>% #' # Expect that values in `pressure` should be between `882` and `1022` #' col_vals_between( -#' columns = vars(pressure), +#' columns = pressure, #' left = 882, #' right = 1022 #' ) %>% #' # Expect that column `tropicalstorm_force_diameter` is of type: integer #' col_is_integer( -#' columns = vars(tropicalstorm_force_diameter) +#' columns = tropicalstorm_force_diameter #' ) %>% #' # Expect that values in `tropicalstorm_force_diameter` should be between #' # `0` and `870` #' col_vals_between( -#' columns = vars(tropicalstorm_force_diameter), +#' columns = tropicalstorm_force_diameter, #' left = 0, #' right = 870, #' na_pass = TRUE #' ) %>% #' # Expect that column `hurricane_force_diameter` is of type: integer #' col_is_integer( -#' columns = vars(hurricane_force_diameter) +#' columns = hurricane_force_diameter #' ) %>% #' # Expect that values in `hurricane_force_diameter` should be between #' # `0` and `300` #' col_vals_between( -#' columns = vars(hurricane_force_diameter), +#' columns = hurricane_force_diameter, #' left = 0, #' right = 300, #' na_pass = TRUE diff --git a/R/get_agent_report.R b/R/get_agent_report.R index a4b247bfe..284062431 100644 --- a/R/get_agent_report.R +++ b/R/get_agent_report.R @@ -210,7 +210,7 @@ #' tbl_name = "small_table", #' label = "An example." #' ) %>% -#' col_vals_gt(columns = vars(a), value = 4) %>% +#' col_vals_gt(columns = a, value = 4) %>% #' interrogate() #' ``` #' diff --git a/R/get_agent_x_list.R b/R/get_agent_x_list.R index 5f4fe1a44..97cefd493 100644 --- a/R/get_agent_x_list.R +++ b/R/get_agent_x_list.R @@ -145,8 +145,8 @@ #' tbl = tbl, #' actions = al #' ) %>% -#' col_vals_gt(columns = vars(a), value = 7) %>% -#' col_is_numeric(columns = vars(a)) %>% +#' col_vals_gt(columns = a, value = 7) %>% +#' col_is_numeric(columns = a) %>% #' interrogate() #' ``` #' diff --git a/R/get_data_extracts.R b/R/get_data_extracts.R index d1ce1bc39..8f5239c12 100644 --- a/R/get_data_extracts.R +++ b/R/get_data_extracts.R @@ -79,7 +79,7 @@ #' ) %>% #' col_vals_gt(vars(d), value = 1000) %>% #' col_vals_between( -#' columns = vars(c), +#' columns = c, #' left = vars(a), right = vars(d), #' na_pass = TRUE #' ) %>% diff --git a/R/get_multiagent_report.R b/R/get_multiagent_report.R index eee09f8f9..bf53fa12a 100644 --- a/R/get_multiagent_report.R +++ b/R/get_multiagent_report.R @@ -146,32 +146,32 @@ #' actions = al #' ) %>% #' col_vals_gt( -#' columns = vars(date_time), +#' columns = date_time, #' value = vars(date), #' na_pass = TRUE #' ) %>% #' col_vals_gt( -#' columns = vars(b), +#' columns = b, #' value = vars(g), #' na_pass = TRUE #' ) %>% #' rows_distinct() %>% #' col_vals_equal( -#' columns = vars(d), +#' columns = d, #' value = vars(d), #' na_pass = TRUE #' ) %>% #' col_vals_between( -#' columns = vars(c), +#' columns = c, #' left = vars(a), right = vars(d) #' ) %>% #' col_vals_not_between( -#' columns = vars(c), +#' columns = c, #' left = 10, right = 20, #' na_pass = TRUE #' ) %>% -#' rows_distinct(columns = vars(d, e, f)) %>% -#' col_is_integer(columns = vars(a)) %>% +#' rows_distinct(columns = d, e, f) %>% +#' col_is_integer(columns = a) %>% #' interrogate() #' ``` #' @@ -181,9 +181,9 @@ #' ```r #' agent_2 <- #' agent_1 %>% -#' col_exists(columns = vars(date, date_time)) %>% +#' col_exists(columns = date, date_time) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}", #' active = FALSE #' ) %>% @@ -197,7 +197,7 @@ #' agent_3 <- #' agent_2 %>% #' col_vals_in_set( -#' columns = vars(f), +#' columns = f, #' set = c("low", "mid", "high") #' ) %>% #' remove_steps(i = 5) %>% diff --git a/R/get_sundered_data.R b/R/get_sundered_data.R index 8c5063abf..e29c1dbfc 100644 --- a/R/get_sundered_data.R +++ b/R/get_sundered_data.R @@ -94,9 +94,9 @@ #' dplyr::select(a:f), #' label = "`get_sundered_data()`" #' ) %>% -#' col_vals_gt(columns = vars(d), value = 1000) %>% +#' col_vals_gt(columns = d, value = 1000) %>% #' col_vals_between( -#' columns = vars(c), +#' columns = c, #' left = vars(a), right = vars(d), #' na_pass = TRUE #' ) %>% diff --git a/R/incorporate.R b/R/incorporate.R index a14ec4325..e3948a7a2 100644 --- a/R/incorporate.R +++ b/R/incorporate.R @@ -75,7 +75,7 @@ #' fn = ~ . %>% ncol() #' ) %>% #' info_columns( -#' columns = vars(a), +#' columns = a, #' info = "In the range of 1 to 10. ((SIMPLE))" #' ) %>% #' info_columns( diff --git a/R/info_add.R b/R/info_add.R index ab574cd52..67949e65a 100644 --- a/R/info_add.R +++ b/R/info_add.R @@ -343,7 +343,7 @@ info_tabular <- function( #' info = "*info text* 3. Statistics: {snippet_1}." #' ) %>% #' info_columns( -#' columns = vars(date, date_time), +#' columns = c(date, date_time), #' info = "UTC time." #' ) #' @@ -401,7 +401,7 @@ info_tabular <- function( #' informant <- #' informant %>% #' info_columns( -#' columns = vars(a), +#' columns = a, #' info = "In the range of 1 to 10. ((SIMPLE))" #' ) %>% #' info_columns( @@ -1064,7 +1064,7 @@ info_section <- function( #' fn = snip_highest(column = "a") #' ) %>% #' info_columns( -#' columns = vars(a), +#' columns = a, #' info = "In the range of 1 to {max_a}. ((SIMPLE))" #' ) %>% #' info_columns( diff --git a/R/interrogate.R b/R/interrogate.R index 8cb90dc6b..0ad7f4ff6 100644 --- a/R/interrogate.R +++ b/R/interrogate.R @@ -105,7 +105,7 @@ #' tbl = tbl, #' label = "`interrogate()` example" #' ) %>% -#' col_vals_gt(columns = vars(a), value = 5) %>% +#' col_vals_gt(columns = a, value = 5) %>% #' interrogate() #' ``` #' diff --git a/R/logging.R b/R/logging.R index cf509b267..4b55f1fb1 100644 --- a/R/logging.R +++ b/R/logging.R @@ -144,8 +144,8 @@ #' label = "An example.", #' actions = al #' ) %>% -#' col_vals_gt(columns = vars(d), 300) %>% -#' col_vals_in_set(columns = vars(f), c("low", "high")) %>% +#' col_vals_gt(columns = d, 300) %>% +#' col_vals_in_set(columns = f, c("low", "high")) %>% #' interrogate() #' #' agent diff --git a/R/object_ops.R b/R/object_ops.R index e8720b839..58c16fc36 100644 --- a/R/object_ops.R +++ b/R/object_ops.R @@ -133,14 +133,14 @@ #' ```r #' agent <- #' agent %>% -#' col_exists(columns = vars(date, date_time)) %>% +#' col_exists(columns = c(date, date_time)) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}" #' ) %>% #' rows_distinct() %>% -#' col_vals_gt(columns = vars(d), value = 100) %>% -#' col_vals_lte(columns = vars(c), value = 5) %>% +#' col_vals_gt(columns = d, value = 100) %>% +#' col_vals_lte(columns = c, value = 5) %>% #' interrogate() #' ``` #' @@ -197,7 +197,7 @@ #' fn = snip_lowest(column = "a") #' ) %>% #' info_columns( -#' columns = vars(a), +#' columns = a, #' info = "From {low_a} to {high_a}." #' ) %>% #' info_columns( @@ -240,13 +240,13 @@ #' actions = al #' ) %>% #' col_vals_gt( -#' columns = vars(b), +#' columns = b, #' value = vars(g), #' na_pass = TRUE, #' label = "b > g" #' ) %>% #' col_is_character( -#' columns = vars(b, f), +#' columns = c(b, f), #' label = "Verifying character-type columns" #' ) %>% #' interrogate() @@ -611,14 +611,14 @@ x_read_disk <- function( #' ```r #' agent <- #' agent %>% -#' col_exists(columns = vars(date, date_time)) %>% +#' col_exists(columns = c(date, date_time)) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}" #' ) %>% #' rows_distinct() %>% -#' col_vals_gt(columns = vars(d), value = 100) %>% -#' col_vals_lte(columns = vars(c), value = 5) %>% +#' col_vals_gt(columns = d, value = 100) %>% +#' col_vals_lte(columns = c, value = 5) %>% #' interrogate() #' ``` #' @@ -672,7 +672,7 @@ x_read_disk <- function( #' fn = snip_lowest(column = "a") #' ) %>% #' info_columns( -#' columns = vars(a), +#' columns = a, #' info = "From {low_a} to {high_a}." #' ) %>% #' info_columns( @@ -895,9 +895,9 @@ export_report <- function( #' label = "An example.", #' actions = al #' ) %>% -#' col_exists(columns = vars(date, date_time)) %>% +#' col_exists(columns = c(date, date_time)) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}" #' ) %>% #' rows_distinct() %>% diff --git a/R/remove_deactivate.R b/R/remove_deactivate.R index 9c3b96469..3fc93df36 100644 --- a/R/remove_deactivate.R +++ b/R/remove_deactivate.R @@ -60,11 +60,11 @@ #' label = "An example." #' ) %>% #' col_exists( -#' columns = vars(date), +#' columns = date, #' active = FALSE #' ) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}", #' active = FALSE #' ) %>% @@ -146,9 +146,9 @@ activate_steps <- function( #' tbl_name = "small_table", #' label = "An example." #' ) %>% -#' col_exists(columns = vars(date)) %>% +#' col_exists(columns = date) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]" #' ) %>% #' interrogate() @@ -227,9 +227,9 @@ deactivate_steps <- function( #' tbl_name = "small_table", #' label = "An example." #' ) %>% -#' col_exists(columns = vars(date)) %>% +#' col_exists(columns = date) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]" #' ) %>% #' interrogate() diff --git a/R/rows_complete.R b/R/rows_complete.R index 160dc43cf..b05cf14e6 100644 --- a/R/rows_complete.R +++ b/R/rows_complete.R @@ -150,7 +150,7 @@ #' ```r #' agent %>% #' rows_complete( -#' columns = vars(a, b), +#' columns = a, b, #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -205,7 +205,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' rows_complete(columns = vars(a, b)) %>% +#' rows_complete(columns = c(a, b)) %>% #' interrogate() #' ``` #' @@ -227,7 +227,7 @@ #' #' ```{r} #' tbl %>% -#' rows_complete(columns = vars(a, b)) %>% +#' rows_complete(columns = c(a, b)) %>% #' dplyr::pull(a) #' ``` #' @@ -237,7 +237,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_rows_complete(tbl, columns = vars(a, b)) +#' expect_rows_complete(tbl, columns = c(a, b)) #' ``` #' #' ## D: Using the test function @@ -246,7 +246,7 @@ #' us. #' #' ```{r} -#' test_rows_complete(tbl, columns = vars(a, b)) +#' test_rows_complete(tbl, columns = c(a, b)) #' ``` #' #' @family validation functions diff --git a/R/rows_distinct.R b/R/rows_distinct.R index f4492a824..158a156d5 100644 --- a/R/rows_distinct.R +++ b/R/rows_distinct.R @@ -151,7 +151,7 @@ #' ```r #' agent %>% #' rows_distinct( -#' columns = vars(a, b), +#' columns = c(a, b), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -206,7 +206,7 @@ #' ```r #' agent <- #' create_agent(tbl = tbl) %>% -#' rows_distinct(columns = vars(a, b)) %>% +#' rows_distinct(columns = c(a, b)) %>% #' interrogate() #' ``` #' @@ -228,7 +228,7 @@ #' #' ```{r} #' tbl %>% -#' rows_distinct(columns = vars(a, b)) %>% +#' rows_distinct(columns = c(a, b)) %>% #' dplyr::pull(a) #' ``` #' @@ -238,7 +238,7 @@ #' time. This is primarily used in **testthat** tests. #' #' ```r -#' expect_rows_distinct(tbl, columns = vars(a, b)) +#' expect_rows_distinct(tbl, columns = c(a, b)) #' ``` #' #' ## D: Using the test function @@ -247,7 +247,7 @@ #' us. #' #' ```{r} -#' test_rows_distinct(tbl, columns = vars(a, b)) +#' test_rows_distinct(tbl, columns = c(a, b)) #' ``` #' #' @family validation functions diff --git a/R/serially.R b/R/serially.R index cbe754d2b..b1e0be717 100644 --- a/R/serially.R +++ b/R/serially.R @@ -52,9 +52,9 @@ #' Here's an example of how to arrange expressions: #' #' ``` -#' ~ test_col_exists(., columns = vars(count)), -#' ~ test_col_is_numeric(., columns = vars(count)), -#' ~ col_vals_gt(., columns = vars(count), value = 2) +#' ~ test_col_exists(., columns = count), +#' ~ test_col_is_numeric(., columns = count), +#' ~ col_vals_gt(., columns = count, value = 2) #' ``` #' #' This series concentrates on the column called `count` and first checks @@ -83,7 +83,7 @@ #' [col_vals_increasing()], etc.) can optionally be inserted at the end of the #' series, serving as a validation step that only undergoes interrogation if #' the prior tests adequately pass. An example of this is -#' `~ test_column_exists(., vars(a)), ~ col_vals_not_null(., vars(a))`). +#' `~ test_column_exists(., a), ~ col_vals_not_null(., a)`). #' #' @param .list *Alternative to `...`* #' @@ -184,9 +184,9 @@ #' ```r #' agent %>% #' serially( -#' ~ col_vals_lt(., columns = vars(a), value = 8), -#' ~ col_vals_gt(., columns = vars(c), value = vars(a)), -#' ~ col_vals_not_null(., columns = vars(b)), +#' ~ col_vals_lt(., columns = a, value = 8), +#' ~ col_vals_gt(., columns = c, value = vars(a)), +#' ~ col_vals_not_null(., columns = b), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), #' label = "The `serially()` step.", @@ -200,9 +200,9 @@ #' steps: #' - serially: #' fns: -#' - ~col_vals_lt(., columns = vars(a), value = 8) -#' - ~col_vals_gt(., columns = vars(c), value = vars(a)) -#' - ~col_vals_not_null(., vars(b)) +#' - ~col_vals_lt(., columns = a, value = 8) +#' - ~col_vals_gt(., columns = c, value = vars(a)) +#' - ~col_vals_not_null(., b) #' preconditions: ~. %>% dplyr::filter(a < 10) #' actions: #' warn_fraction: 0.1 @@ -249,9 +249,9 @@ #' agent_1 <- #' create_agent(tbl = tbl) %>% #' serially( -#' ~ test_col_is_numeric(., columns = vars(a, b)), -#' ~ test_col_vals_not_null(., columns = vars(a, b)), -#' ~ col_vals_gt(., columns = vars(b), value = vars(a)) +#' ~ test_col_is_numeric(., columns = c(a, b)), +#' ~ test_col_vals_not_null(., columns = c(a, b)), +#' ~ col_vals_gt(., columns = b, value = vars(a)) #' ) %>% #' interrogate() #' ``` @@ -276,8 +276,8 @@ #' agent_2 <- #' create_agent(tbl = tbl) %>% #' serially( -#' ~ test_col_is_numeric(., columns = vars(a, b)), -#' ~ test_col_vals_not_null(., columns = vars(a, b)) +#' ~ test_col_is_numeric(., columns = c(a, b)), +#' ~ test_col_vals_not_null(., columns = c(a, b)) #' ) %>% #' interrogate() #' ``` @@ -299,9 +299,9 @@ #' ```{r} #' tbl %>% #' serially( -#' ~ test_col_is_numeric(., columns = vars(a, b)), -#' ~ test_col_vals_not_null(., columns = vars(a, b)), -#' ~ col_vals_gt(., columns = vars(b), value = vars(a)) +#' ~ test_col_is_numeric(., columns = c(a, b)), +#' ~ test_col_vals_not_null(., columns = c(a, b)), +#' ~ col_vals_gt(., columns = b, value = vars(a)) #' ) #' ``` #' @@ -313,9 +313,9 @@ #' ```r #' expect_serially( #' tbl, -#' ~ test_col_is_numeric(., columns = vars(a, b)), -#' ~ test_col_vals_not_null(., columns = vars(a, b)), -#' ~ col_vals_gt(., columns = vars(b), value = vars(a)) +#' ~ test_col_is_numeric(., columns = c(a, b)), +#' ~ test_col_vals_not_null(., columns = c(a, b)), +#' ~ col_vals_gt(., columns = b, value = vars(a)) #' ) #' ``` #' @@ -327,9 +327,9 @@ #' ```{r} #' tbl %>% #' test_serially( -#' ~ test_col_is_numeric(., columns = vars(a, b)), -#' ~ test_col_vals_not_null(., columns = vars(a, b)), -#' ~ col_vals_gt(., columns = vars(b), value = vars(a)) +#' ~ test_col_is_numeric(., columns = c(a, b)), +#' ~ test_col_vals_not_null(., columns = c(a, b)), +#' ~ col_vals_gt(., columns = b, value = vars(a)) #' ) #' ``` #' diff --git a/R/table_transformers.R b/R/table_transformers.R index 3e8f5684e..bea4be344 100644 --- a/R/table_transformers.R +++ b/R/table_transformers.R @@ -67,7 +67,7 @@ #' ```{r} #' tt_summary_stats(tbl = game_revenue) %>% #' col_vals_lt( -#' columns = vars(item_revenue), +#' columns = item_revenue, #' value = 150, #' segments = .param. ~ "max" #' ) @@ -83,7 +83,7 @@ #' dplyr::filter(item_type == "iap") %>% #' tt_summary_stats() %>% #' col_vals_between( -#' columns = vars(item_revenue), +#' columns = item_revenue, #' left = 8, right = 12, #' segments = .param. ~ "med" #' ) @@ -112,7 +112,7 @@ #' rows_complete() %>% #' rows_distinct() %>% #' col_vals_between( -#' columns = vars(item_revenue), +#' columns = item_revenue, #' left = 8, right = 12, #' preconditions = ~ . %>% #' dplyr::filter(item_type == "iap") %>% @@ -238,11 +238,11 @@ tt_summary_stats <- function(tbl) { #' ```{r} #' tt_string_info(tbl = game_revenue) %>% #' col_vals_equal( -#' columns = vars(player_id), +#' columns = player_id, #' value = 15 #' ) %>% #' col_vals_equal( -#' columns = vars(session_id), +#' columns = session_id, #' value = 24 #' ) #' ``` @@ -256,7 +256,7 @@ tt_summary_stats <- function(tbl) { #' ```{r} #' tt_string_info(tbl = small_table) %>% #' test_col_vals_lte( -#' columns = vars(f), +#' columns = f, #' value = 4 #' ) #' ``` @@ -343,7 +343,7 @@ tt_string_info <- function(tbl) { #' tt_tbl_dims(tbl = game_revenue) %>% #' dplyr::filter(.param. == "rows") %>% #' test_col_vals_gt( -#' columns = vars(value), +#' columns = value, #' value = 1500 #' ) #' ``` @@ -354,8 +354,7 @@ tt_string_info <- function(tbl) { #' ```{r} #' tt_tbl_dims(tbl = small_table) %>% #' dplyr::filter(.param. == "columns") %>% -#' test_col_vals_lt( -#' columns = vars(value), +#' columns = value, #' value = 10 #' ) #' ``` @@ -421,7 +420,7 @@ tt_tbl_dims <- function(tbl) { #' ```{r} #' tt_tbl_colnames(tbl = game_revenue) %>% #' test_col_vals_make_subset( -#' columns = vars(value), +#' columns = value, #' set = c("acquisition", "country") #' ) #' ``` @@ -436,7 +435,7 @@ tt_tbl_dims <- function(tbl) { #' tt_tbl_colnames() %>% #' tt_string_info() %>% #' test_col_vals_lt( -#' columns = vars(value), +#' columns = value, #' value = 15 #' ) #' ``` @@ -953,7 +952,7 @@ tt_time_slice <- function( #' keep = "right" #' ) %>% #' test_col_vals_lte( -#' columns = vars(session_duration), +#' columns = session_duration, #' value = get_tt_param( #' tbl = stats_tbl, #' param = "max", diff --git a/R/tbl_from_file.R b/R/tbl_from_file.R index 7e96bae10..b32b11abb 100644 --- a/R/tbl_from_file.R +++ b/R/tbl_from_file.R @@ -135,7 +135,7 @@ #' col_types = "TDdcddlc" #' ) #' ) %>% -#' col_vals_gt(columns = vars(a), value = 0) +#' col_vals_gt(columns = a, value = 0) #' ``` #' #' All of the file-reading instructions are encapsulated in the `tbl` expression @@ -162,7 +162,7 @@ #' tbl_name = "small_table", #' label = "`file_tbl()` example.", #' ) %>% -#' col_vals_gt(columns = vars(a), value = 0) %>% +#' col_vals_gt(columns = a, value = 0) %>% #' interrogate() #' ``` #' diff --git a/R/tbl_store.R b/R/tbl_store.R index ed772da17..d59f850af 100644 --- a/R/tbl_store.R +++ b/R/tbl_store.R @@ -620,7 +620,7 @@ add_to_name_list <- function( #' label = "`tbl_source()` example", #' actions = action_levels(warn_at = 0.10) #' ) %>% -#' col_exists(columns = vars(date, date_time)) %>% +#' col_exists(columns = c(date, date_time)) %>% #' interrogate() #' ``` #' diff --git a/R/write_testthat_file.R b/R/write_testthat_file.R index dec9e6fb7..4f42fbb36 100644 --- a/R/write_testthat_file.R +++ b/R/write_testthat_file.R @@ -79,7 +79,7 @@ #' #' expect_col_exists( #' tbl, -#' columns = vars(date_time), +#' columns = date_time, #' threshold = 1 #' ) #' }) @@ -88,7 +88,7 @@ #' #' expect_col_vals_lte( #' tbl, -#' columns = vars(c), +#' columns = c, #' value = 5, #' threshold = 0.25 #' ) @@ -106,8 +106,8 @@ #' tbl = ~ small_table, #' actions = action_levels(stop_at = 0.25) #' ) %>% -#' col_exists(vars(date_time)) %>% -#' col_vals_lte(vars(c), value = 5) +#' col_exists(date_time) %>% +#' col_vals_lte(c, value = 5) #' #' write_testthat_file( #' agent = agent, @@ -206,13 +206,13 @@ #' label = "An example.", #' actions = al #' ) %>% -#' col_exists(vars(date, date_time)) %>% +#' col_exists(c(date, date_time)) %>% #' col_vals_regex( -#' vars(b), +#' b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}" #' ) %>% -#' col_vals_gt(vars(d), value = 100) %>% -#' col_vals_lte(vars(c), value = 5) %>% +#' col_vals_gt(d, value = 100) %>% +#' col_vals_lte(c, value = 5) %>% #' interrogate() #' ``` #' @@ -245,7 +245,7 @@ #' #' expect_col_exists( #' tbl, -#' columns = vars(date), +#' columns = date, #' threshold = 1 #' ) #' }) @@ -254,7 +254,7 @@ #' #' expect_col_exists( #' tbl, -#' columns = vars(date_time), +#' columns = date_time, #' threshold = 1 #' ) #' }) @@ -264,7 +264,7 @@ #' #' expect_col_vals_regex( #' tbl, -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}", #' threshold = 0.25 #' ) @@ -274,7 +274,7 @@ #' #' expect_col_vals_gt( #' tbl, -#' columns = vars(d), +#' columns = d, #' value = 100, #' threshold = 0.25 #' ) @@ -284,7 +284,7 @@ #' #' expect_col_vals_lte( #' tbl, -#' columns = vars(c), +#' columns = c, #' value = 5, #' threshold = 0.25 #' ) diff --git a/R/yaml_read_agent.R b/R/yaml_read_agent.R index 8718ff36f..f874b5b3f 100644 --- a/R/yaml_read_agent.R +++ b/R/yaml_read_agent.R @@ -304,14 +304,14 @@ yaml_agent_interrogate <- function( #' notify_at = 0.35 #' ) #' ) %>% -#' col_exists(columns = vars(date, date_time)) %>% +#' col_exists(columns = c(date, date_time)) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}" #' ) %>% #' rows_distinct() %>% -#' col_vals_gt(columns = vars(d), value = 100) %>% -#' col_vals_lte(columns = vars(c), value = 5) +#' col_vals_gt(columns = d, value = 100) %>% +#' col_vals_lte(columns = c, value = 5) #' ``` #' #' The agent can be written to a **pointblank** YAML file with [yaml_write()]. @@ -357,19 +357,19 @@ yaml_agent_interrogate <- function( #' label = "A simple example with the `small_table`." #' ) %>% #' col_exists( -#' columns = vars(date, date_time) +#' columns = c(date, date_time) #' ) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}" #' ) %>% #' rows_distinct() %>% #' col_vals_gt( -#' columns = vars(d), +#' columns = d, #' value = 100 #' ) %>% #' col_vals_lte( -#' columns = vars(c), +#' columns = c, #' value = 5 #' ) #' ``` diff --git a/R/yaml_write.R b/R/yaml_write.R index 0087753e2..107dd1ffe 100644 --- a/R/yaml_write.R +++ b/R/yaml_write.R @@ -139,14 +139,14 @@ #' ```r #' agent <- #' agent %>% -#' col_exists(columns = vars(date, date_time)) %>% +#' col_exists(columns = c(date, date_time)) %>% #' col_vals_regex( -#' columns = vars(b), +#' columns = b, #' regex = "[0-9]-[a-z]{3}-[0-9]{3}" #' ) %>% #' rows_distinct() %>% -#' col_vals_gt(columns = vars(d), value = 100) %>% -#' col_vals_lte(columns = vars(c), value = 5) +#' col_vals_gt(columns = d, value = 100) %>% +#' col_vals_lte(columns = c, value = 5) #' ``` #' #' The agent can be written to a **pointblank**-readable YAML file with the @@ -282,7 +282,7 @@ #' informant <- #' informant %>% #' info_columns( -#' columns = vars(a), +#' columns = a, #' info = "In the range of 1 to 10. (SIMPLE)" #' ) %>% #' info_columns( @@ -290,7 +290,7 @@ #' info = "Time-based values (e.g., `Sys.time()`)." #' ) %>% #' info_columns( -#' columns = "date", +#' columns = date, #' info = "The date part of `date_time`. (CALC)" #' ) #' ``` From 10bfbae1cf3a0048584b444b351e29a33aa27f74 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 10:20:50 -0400 Subject: [PATCH 03/46] fix example typo --- R/table_transformers.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/table_transformers.R b/R/table_transformers.R index bea4be344..d499ee6c5 100644 --- a/R/table_transformers.R +++ b/R/table_transformers.R @@ -354,6 +354,7 @@ tt_string_info <- function(tbl) { #' ```{r} #' tt_tbl_dims(tbl = small_table) %>% #' dplyr::filter(.param. == "columns") %>% +#' test_col_vals_lt( #' columns = value, #' value = 10 #' ) From 2f1046d3fc0f6ab79966f7c868829edc10a5331c Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 10:33:19 -0400 Subject: [PATCH 04/46] document() --- man/action_levels.Rd | 14 +++++------ man/activate_steps.Rd | 4 +-- man/all_passed.Rd | 6 ++--- man/col_exists.Rd | 10 ++++---- man/col_is_character.Rd | 10 ++++---- man/col_is_date.Rd | 10 ++++---- man/col_is_factor.Rd | 10 ++++---- man/col_is_integer.Rd | 10 ++++---- man/col_is_logical.Rd | 10 ++++---- man/col_is_numeric.Rd | 10 ++++---- man/col_is_posix.Rd | 10 ++++---- man/col_vals_between.Rd | 12 ++++----- man/col_vals_decreasing.Rd | 10 ++++---- man/col_vals_equal.Rd | 10 ++++---- man/col_vals_gt.Rd | 10 ++++---- man/col_vals_gte.Rd | 10 ++++---- man/col_vals_in_set.Rd | 10 ++++---- man/col_vals_increasing.Rd | 10 ++++---- man/col_vals_lt.Rd | 10 ++++---- man/col_vals_lte.Rd | 10 ++++---- man/col_vals_make_set.Rd | 10 ++++---- man/col_vals_make_subset.Rd | 10 ++++---- man/col_vals_not_between.Rd | 12 ++++----- man/col_vals_not_equal.Rd | 10 ++++---- man/col_vals_not_in_set.Rd | 10 ++++---- man/col_vals_not_null.Rd | 10 ++++---- man/col_vals_null.Rd | 10 ++++---- man/col_vals_regex.Rd | 10 ++++---- man/col_vals_within_spec.Rd | 10 ++++---- man/conjointly.Rd | 38 ++++++++++++++-------------- man/create_agent.Rd | 10 ++++---- man/create_multiagent.Rd | 4 +-- man/deactivate_steps.Rd | 4 +-- man/draft_validation.Rd | 46 +++++++++++++++++----------------- man/export_report.Rd | 10 ++++---- man/file_tbl.Rd | 4 +-- man/get_agent_report.Rd | 2 +- man/get_agent_x_list.Rd | 4 +-- man/get_data_extracts.Rd | 2 +- man/get_multiagent_report.Rd | 20 +++++++-------- man/get_sundered_data.Rd | 4 +-- man/get_tt_param.Rd | 2 +- man/incorporate.Rd | 2 +- man/info_columns.Rd | 4 +-- man/info_snippet.Rd | 2 +- man/interrogate.Rd | 2 +- man/log4r_step.Rd | 4 +-- man/remove_steps.Rd | 4 +-- man/rows_complete.Rd | 10 ++++---- man/rows_distinct.Rd | 10 ++++---- man/serially.Rd | 48 ++++++++++++++++++------------------ man/set_tbl.Rd | 4 +-- man/tbl_source.Rd | 2 +- man/tt_string_info.Rd | 6 ++--- man/tt_summary_stats.Rd | 6 ++--- man/tt_tbl_colnames.Rd | 4 +-- man/tt_tbl_dims.Rd | 4 +-- man/write_testthat_file.Rd | 26 +++++++++---------- man/x_write_disk.Rd | 14 +++++------ man/yaml_agent_show_exprs.Rd | 16 ++++++------ man/yaml_write.Rd | 12 ++++----- 61 files changed, 309 insertions(+), 309 deletions(-) diff --git a/man/action_levels.Rd b/man/action_levels.Rd index 680175b3d..e33cbbda9 100644 --- a/man/action_levels.Rd +++ b/man/action_levels.Rd @@ -161,10 +161,10 @@ validation steps and interrogate the \code{small_table}. actions = al ) \%>\% col_vals_gt( - columns = vars(a), value = 2 + columns = a, value = 2 ) \%>\% col_vals_lt( - columns = vars(d), value = 20000 + columns = d, value = 20000 ) \%>\% interrogate() }\if{html}{\out{}} @@ -192,11 +192,11 @@ another such object to the validation step instead (this time using the actions = al ) \%>\% col_vals_gt( - columns = vars(a), value = 2, + columns = a, value = 2, actions = warn_on_fail(warn_at = 0.5) ) \%>\% col_vals_lt( - columns = vars(d), value = 20000 + columns = d, value = 20000 ) \%>\% interrogate() }\if{html}{\out{}} @@ -221,7 +221,7 @@ data). \if{html}{\out{
}}\preformatted{small_table \%>\% col_vals_gt( - columns = vars(a), value = 2, + columns = a, value = 2, actions = warn_on_fail(warn_at = 2) ) }\if{html}{\out{
}} @@ -256,7 +256,7 @@ With the same pipeline, not supplying anything for \code{actions} (it's \code{NU default) will have the same effect as using \code{stop_on_fail(stop_at = 1)}. \if{html}{\out{
}}\preformatted{small_table \%>\% - col_vals_gt(columns = vars(a), value = 2) + col_vals_gt(columns = a, value = 2) }\if{html}{\out{
}} \if{html}{\out{
}}\preformatted{## Error: Exceedance of failed test units where values in `a` should have @@ -270,7 +270,7 @@ Here's the equivalent set of statements: \if{html}{\out{
}}\preformatted{small_table \%>\% col_vals_gt( - columns = vars(a), value = 2, + columns = a, value = 2, actions = stop_on_fail(stop_at = 1) ) }\if{html}{\out{
}} diff --git a/man/activate_steps.Rd b/man/activate_steps.Rd index ca41ab711..31db1cd35 100644 --- a/man/activate_steps.Rd +++ b/man/activate_steps.Rd @@ -51,11 +51,11 @@ agent_1 <- label = "An example." ) \%>\% col_exists( - columns = vars(date), + columns = date, active = FALSE ) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]{3}-[0-9]{3}", active = FALSE ) \%>\% diff --git a/man/all_passed.Rd b/man/all_passed.Rd index 601e2c263..3db914035 100644 --- a/man/all_passed.Rd +++ b/man/all_passed.Rd @@ -68,9 +68,9 @@ Validate that values in column \code{a} are always greater than 4. \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_gt(columns = vars(a), value = 3) \%>\% - col_vals_lte(columns = vars(a), value = 10) \%>\% - col_vals_increasing(columns = vars(a)) \%>\% + col_vals_gt(columns = a, value = 3) \%>\% + col_vals_lte(columns = a, value = 10) \%>\% + col_vals_increasing(columns = a) \%>\% interrogate() }\if{html}{\out{
}} diff --git a/man/col_exists.Rd b/man/col_exists.Rd index eabadc70c..eba6fb251 100644 --- a/man/col_exists.Rd +++ b/man/col_exists.Rd @@ -210,7 +210,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_exists( - columns = vars(a), + columns = a, actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `col_exists()` step.", active = FALSE @@ -268,7 +268,7 @@ Validate that column \code{a} exists in the \code{tbl} table with \code{col_exis \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_exists(columns = vars(a)) \%>\% + col_exists(columns = a) \%>\% interrogate() }\if{html}{\out{
}} @@ -289,7 +289,7 @@ This way of using validation functions acts as a data filter. Data is passed through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. -\if{html}{\out{
}}\preformatted{tbl \%>\% col_exists(columns = vars(a)) +\if{html}{\out{
}}\preformatted{tbl \%>\% col_exists(columns = a) #> # A tibble: 6 x 2 #> a b #> @@ -307,7 +307,7 @@ The behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_exists(tbl, columns = vars(a)) +\if{html}{\out{
}}\preformatted{expect_col_exists(tbl, columns = a) }\if{html}{\out{
}} } @@ -316,7 +316,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_exists(columns = vars(a)) +\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_exists(columns = a) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_is_character.Rd b/man/col_is_character.Rd index a933bf632..54ef847ec 100644 --- a/man/col_is_character.Rd +++ b/man/col_is_character.Rd @@ -211,7 +211,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_is_character( - columns = vars(a), + columns = a, actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `col_is_character()` step.", active = FALSE @@ -269,7 +269,7 @@ Validate that column \code{b} has the \code{character} class. \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_is_character(columns = vars(b)) \%>\% + col_is_character(columns = b) \%>\% interrogate() }\if{html}{\out{
}} @@ -291,7 +291,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - col_is_character(columns = vars(b)) \%>\% + col_is_character(columns = b) \%>\% dplyr::slice(1:5) #> # A tibble: 5 x 2 #> a b @@ -309,7 +309,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_is_character(tbl, columns = vars(b)) +\if{html}{\out{
}}\preformatted{expect_col_is_character(tbl, columns = b) }\if{html}{\out{
}} } @@ -318,7 +318,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_is_character(columns = vars(b)) +\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_is_character(columns = b) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_is_date.Rd b/man/col_is_date.Rd index a9dd83989..9ad8030a8 100644 --- a/man/col_is_date.Rd +++ b/man/col_is_date.Rd @@ -211,7 +211,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_is_date( - columns = vars(a), + columns = a, actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `col_is_date()` step.", active = FALSE @@ -268,7 +268,7 @@ Validate that the column \code{date} has the \code{Date} class. \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% - col_is_date(columns = vars(date)) \%>\% + col_is_date(columns = date) \%>\% interrogate() }\if{html}{\out{
}} @@ -290,7 +290,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% - col_is_date(columns = vars(date)) \%>\% + col_is_date(columns = date) \%>\% dplyr::slice(1:5) #> # A tibble: 5 x 8 #> date_time date a b c d e f @@ -308,7 +308,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_is_date(small_table, columns = vars(date)) +\if{html}{\out{
}}\preformatted{expect_col_is_date(small_table, columns = date) }\if{html}{\out{
}} } @@ -317,7 +317,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_is_date(columns = vars(date)) +\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_is_date(columns = date) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_is_factor.Rd b/man/col_is_factor.Rd index 8393c8e66..7e5256bfe 100644 --- a/man/col_is_factor.Rd +++ b/man/col_is_factor.Rd @@ -211,7 +211,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_is_factor( - columns = vars(a), + columns = a, actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `col_is_factor()` step.", active = FALSE @@ -274,7 +274,7 @@ Validate that the column \code{f} in the \code{tbl} object is of the \code{facto \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_is_factor(columns = vars(f)) \%>\% + col_is_factor(columns = f) \%>\% interrogate() }\if{html}{\out{
}} @@ -296,7 +296,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - col_is_factor(columns = vars(f)) \%>\% + col_is_factor(columns = f) \%>\% dplyr::slice(1:5) #> # A tibble: 5 x 8 #> date_time date a b c d e f @@ -314,7 +314,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_is_factor(tbl, vars(f)) +\if{html}{\out{
}}\preformatted{expect_col_is_factor(tbl, f) }\if{html}{\out{
}} } @@ -323,7 +323,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_is_factor(columns = vars(f)) +\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_is_factor(columns = f) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_is_integer.Rd b/man/col_is_integer.Rd index 884e125aa..bbf11116e 100644 --- a/man/col_is_integer.Rd +++ b/man/col_is_integer.Rd @@ -211,7 +211,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_is_integer( - columns = vars(a), + columns = a, actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `col_is_integer()` step.", active = FALSE @@ -267,7 +267,7 @@ Validate that column \code{b} has the \code{integer} class. \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_is_integer(columns = vars(b)) \%>\% + col_is_integer(columns = b) \%>\% interrogate() }\if{html}{\out{
}} @@ -288,7 +288,7 @@ This way of using validation functions acts as a data filter. Data is passed through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. -\if{html}{\out{
}}\preformatted{tbl \%>\% col_is_integer(columns = vars(b)) +\if{html}{\out{
}}\preformatted{tbl \%>\% col_is_integer(columns = b) #> # A tibble: 6 x 2 #> a b #> @@ -306,7 +306,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_is_integer(tbl, columns = vars(b)) +\if{html}{\out{
}}\preformatted{expect_col_is_integer(tbl, columns = b) }\if{html}{\out{
}} } @@ -315,7 +315,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_is_integer(columns = vars(b)) +\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_is_integer(columns = b) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_is_logical.Rd b/man/col_is_logical.Rd index d3bef5639..eefd5acb1 100644 --- a/man/col_is_logical.Rd +++ b/man/col_is_logical.Rd @@ -211,7 +211,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_is_logical( - columns = vars(a), + columns = a, actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `col_is_logical()` step.", active = FALSE @@ -269,7 +269,7 @@ Validate that the column \code{e} has the \code{logical} class. \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% - col_is_logical(columns = vars(e)) \%>\% + col_is_logical(columns = e) \%>\% interrogate() }\if{html}{\out{
}} @@ -291,7 +291,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% - col_is_logical(columns = vars(e)) \%>\% + col_is_logical(columns = e) \%>\% dplyr::slice(1:5) #> # A tibble: 5 x 8 #> date_time date a b c d e f @@ -309,7 +309,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_is_logical(small_table, columns = vars(e)) +\if{html}{\out{
}}\preformatted{expect_col_is_logical(small_table, columns = e) }\if{html}{\out{
}} } @@ -318,7 +318,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_is_logical(columns = vars(e)) +\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_is_logical(columns = e) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_is_numeric.Rd b/man/col_is_numeric.Rd index 3b9096cad..1ccd357e5 100644 --- a/man/col_is_numeric.Rd +++ b/man/col_is_numeric.Rd @@ -211,7 +211,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_is_numeric( - columns = vars(a), + columns = a, actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `col_is_numeric()` step.", active = FALSE @@ -269,7 +269,7 @@ Validate that the column \code{d} has the \code{numeric} class. \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% - col_is_numeric(columns = vars(d)) \%>\% + col_is_numeric(columns = d) \%>\% interrogate() }\if{html}{\out{
}} @@ -291,7 +291,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% - col_is_numeric(columns = vars(d)) \%>\% + col_is_numeric(columns = d) \%>\% dplyr::slice(1:5) #> # A tibble: 5 x 8 #> date_time date a b c d e f @@ -309,7 +309,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_is_numeric(small_table, columns = vars(d)) +\if{html}{\out{
}}\preformatted{expect_col_is_numeric(small_table, columns = d) }\if{html}{\out{
}} } @@ -318,7 +318,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_is_numeric(columns = vars(d)) +\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_is_numeric(columns = d) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_is_posix.Rd b/man/col_is_posix.Rd index da2efde82..1107f3c7d 100644 --- a/man/col_is_posix.Rd +++ b/man/col_is_posix.Rd @@ -211,7 +211,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_is_posix( - columns = vars(a), + columns = a, actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `col_is_posix()` step.", active = FALSE @@ -269,7 +269,7 @@ Validate that the column \code{date_time} is indeed a date-time column. \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% - col_is_posix(columns = vars(date_time)) \%>\% + col_is_posix(columns = date_time) \%>\% interrogate() }\if{html}{\out{
}} @@ -291,7 +291,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% - col_is_posix(columns = vars(date_time)) \%>\% + col_is_posix(columns = date_time) \%>\% dplyr::slice(1:5) #> # A tibble: 5 x 8 #> date_time date a b c d e f @@ -309,7 +309,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_is_posix(small_table, columns = vars(date_time)) +\if{html}{\out{
}}\preformatted{expect_col_is_posix(small_table, columns = date_time) }\if{html}{\out{
}} } @@ -318,7 +318,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_is_posix(columns = vars(date_time)) +\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_is_posix(columns = date_time) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_between.Rd b/man/col_vals_between.Rd index 0b8544b5b..4bb2e4424 100644 --- a/man/col_vals_between.Rd +++ b/man/col_vals_between.Rd @@ -358,7 +358,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_between( - columns = vars(a), + columns = a, left = 1, right = 2, inclusive = c(TRUE, FALSE), @@ -433,7 +433,7 @@ are \code{NA} values, we'll choose to let those pass validation by setting \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% col_vals_between( - columns = vars(c), + columns = c, left = 1, right = 9, na_pass = TRUE ) \%>\% @@ -459,7 +459,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% col_vals_between( - columns = vars(c), + columns = c, left = 1, right = 9, na_pass = TRUE ) \%>\% @@ -474,7 +474,7 @@ With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_between( - small_table, columns = vars(c), + small_table, columns = c, left = 1, right = 9, na_pass = TRUE ) @@ -488,7 +488,7 @@ us. \if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_between( - columns = vars(c), + columns = c, left = 1, right = 9, na_pass = TRUE ) @@ -505,7 +505,7 @@ values are \code{9} and they now fall outside of the upper (or right) bound. \if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_between( - columns = vars(c), left = 1, right = 9, + columns = c, left = 1, right = 9, inclusive = c(TRUE, FALSE), na_pass = TRUE ) diff --git a/man/col_vals_decreasing.Rd b/man/col_vals_decreasing.Rd index fc02d3a42..59b5f0327 100644 --- a/man/col_vals_decreasing.Rd +++ b/man/col_vals_decreasing.Rd @@ -345,7 +345,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_decreasing( - columns = vars(a), + columns = a, allow_stationary = TRUE, increasing_tol = 0.5, na_pass = TRUE, @@ -430,7 +430,7 @@ to \code{TRUE}). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = game_revenue_2) \%>\% col_vals_decreasing( - columns = vars(time_left), + columns = time_left, allow_stationary = TRUE ) \%>\% interrogate() @@ -455,7 +455,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{game_revenue_2 \%>\% col_vals_decreasing( - columns = vars(time_left), + columns = time_left, allow_stationary = TRUE ) \%>\% dplyr::select(time_left) \%>\% @@ -475,7 +475,7 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_decreasing( game_revenue_2, - columns = vars(time_left), + columns = time_left, allow_stationary = TRUE ) }\if{html}{\out{
}} @@ -488,7 +488,7 @@ us. \if{html}{\out{
}}\preformatted{game_revenue_2 \%>\% test_col_vals_decreasing( - columns = vars(time_left), + columns = time_left, allow_stationary = TRUE ) #> [1] TRUE diff --git a/man/col_vals_equal.Rd b/man/col_vals_equal.Rd index 237e3e164..601602a70 100644 --- a/man/col_vals_equal.Rd +++ b/man/col_vals_equal.Rd @@ -328,7 +328,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_equal( - columns = vars(a), + columns = a, value = 1, na_pass = TRUE, preconditions = ~ . \%>\% dplyr::filter(a < 10), @@ -398,7 +398,7 @@ units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_equal(columns = vars(a), value = 5) \%>\% + col_vals_equal(columns = a, value = 5) \%>\% interrogate() }\if{html}{\out{
}} @@ -420,7 +420,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - col_vals_equal(columns = vars(a), value = 5) \%>\% + col_vals_equal(columns = a, value = 5) \%>\% dplyr::pull(a) #> [1] 5 5 5 5 5 5 }\if{html}{\out{
}} @@ -431,7 +431,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_equal(tbl, columns = vars(a), value = 5) +\if{html}{\out{
}}\preformatted{expect_col_vals_equal(tbl, columns = a, value = 5) }\if{html}{\out{
}} } @@ -440,7 +440,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{test_col_vals_equal(tbl, columns = vars(a), value = 5) +\if{html}{\out{
}}\preformatted{test_col_vals_equal(tbl, columns = a, value = 5) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_gt.Rd b/man/col_vals_gt.Rd index ed4d4bb34..d945bd960 100644 --- a/man/col_vals_gt.Rd +++ b/man/col_vals_gt.Rd @@ -329,7 +329,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_gt( - columns = vars(a), + columns = a, value = 1, na_pass = TRUE, preconditions = ~ . \%>\% dplyr::filter(a < 10), @@ -399,7 +399,7 @@ test units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_gt(columns = vars(a), value = 4) \%>\% + col_vals_gt(columns = a, value = 4) \%>\% interrogate() }\if{html}{\out{
}} @@ -420,7 +420,7 @@ This way of using validation functions acts as a data filter. Data is passed through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. -\if{html}{\out{
}}\preformatted{tbl \%>\% col_vals_gt(columns = vars(a), value = 4) +\if{html}{\out{
}}\preformatted{tbl \%>\% col_vals_gt(columns = a, value = 4) #> # A tibble: 6 x 6 #> a b c d e f #> @@ -438,7 +438,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_gt(tbl, columns = vars(a), value = 4) +\if{html}{\out{
}}\preformatted{expect_col_vals_gt(tbl, columns = a, value = 4) }\if{html}{\out{
}} } @@ -447,7 +447,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{test_col_vals_gt(tbl, columns = vars(a), value = 4) +\if{html}{\out{
}}\preformatted{test_col_vals_gt(tbl, columns = a, value = 4) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_gte.Rd b/man/col_vals_gte.Rd index fa80a2bfe..e1976a246 100644 --- a/man/col_vals_gte.Rd +++ b/man/col_vals_gte.Rd @@ -328,7 +328,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_gte( - columns = vars(a), + columns = a, value = 1, na_pass = TRUE, preconditions = ~ . \%>\% dplyr::filter(a < 10), @@ -398,7 +398,7 @@ are 6 test units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_gte(columns = vars(a), value = 5) \%>\% + col_vals_gte(columns = a, value = 5) \%>\% interrogate() }\if{html}{\out{
}} @@ -419,7 +419,7 @@ This way of using validation functions acts as a data filter. Data is passed through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. -\if{html}{\out{
}}\preformatted{tbl \%>\% col_vals_gte(columns = vars(a), value = 5) +\if{html}{\out{
}}\preformatted{tbl \%>\% col_vals_gte(columns = a, value = 5) #> # A tibble: 6 x 6 #> a b c d e f #> @@ -437,7 +437,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_gte(tbl, columns = vars(a), value = 5) +\if{html}{\out{
}}\preformatted{expect_col_vals_gte(tbl, columns = a, value = 5) }\if{html}{\out{
}} } @@ -446,7 +446,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{test_col_vals_gte(tbl, columns = vars(a), value = 5) +\if{html}{\out{
}}\preformatted{test_col_vals_gte(tbl, columns = a, value = 5) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_in_set.Rd b/man/col_vals_in_set.Rd index 8386f6dcb..6bd3912bc 100644 --- a/man/col_vals_in_set.Rd +++ b/man/col_vals_in_set.Rd @@ -302,7 +302,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_in_set( - columns = vars(a), + columns = a, set = c(1, 2, 3, 4), preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), @@ -372,7 +372,7 @@ any failing test units (there are 13 test units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% col_vals_in_set( - columns = vars(f), set = c("low", "mid", "high") + columns = f, set = c("low", "mid", "high") ) \%>\% interrogate() }\if{html}{\out{
}} @@ -396,7 +396,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% col_vals_in_set( - columns = vars(f), set = c("low", "mid", "high") + columns = f, set = c("low", "mid", "high") ) \%>\% dplyr::pull(f) \%>\% unique() @@ -411,7 +411,7 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_in_set( small_table, - columns = vars(f), set = c("low", "mid", "high") + columns = f, set = c("low", "mid", "high") ) }\if{html}{\out{
}} } @@ -423,7 +423,7 @@ us. \if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_in_set( - columns = vars(f), set = c("low", "mid", "high") + columns = f, set = c("low", "mid", "high") ) #> [1] TRUE }\if{html}{\out{
}} diff --git a/man/col_vals_increasing.Rd b/man/col_vals_increasing.Rd index f3043355b..78e0ded58 100644 --- a/man/col_vals_increasing.Rd +++ b/man/col_vals_increasing.Rd @@ -345,7 +345,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_increasing( - columns = vars(a), + columns = a, allow_stationary = TRUE, decreasing_tol = 0.5, na_pass = TRUE, @@ -417,7 +417,7 @@ to \code{TRUE}). We'll determine if this validation has any failing test units \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = game_revenue) \%>\% col_vals_increasing( - columns = vars(session_start), + columns = session_start, allow_stationary = TRUE ) \%>\% interrogate() @@ -442,7 +442,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{game_revenue \%>\% col_vals_increasing( - columns = vars(session_start), + columns = session_start, allow_stationary = TRUE ) \%>\% dplyr::select(session_start) \%>\% @@ -462,7 +462,7 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_increasing( game_revenue, - columns = vars(session_start), + columns = session_start, allow_stationary = TRUE ) }\if{html}{\out{
}} @@ -475,7 +475,7 @@ us. \if{html}{\out{
}}\preformatted{game_revenue \%>\% test_col_vals_increasing( - columns = vars(session_start), + columns = session_start, allow_stationary = TRUE ) #> [1] TRUE diff --git a/man/col_vals_lt.Rd b/man/col_vals_lt.Rd index 0af9dd513..374bc4791 100644 --- a/man/col_vals_lt.Rd +++ b/man/col_vals_lt.Rd @@ -329,7 +329,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_lt( - columns = vars(a), + columns = a, value = 1, na_pass = TRUE, preconditions = ~ . \%>\% dplyr::filter(a < 10), @@ -399,7 +399,7 @@ units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_lt(columns = vars(c), value = 5) \%>\% + col_vals_lt(columns = c, value = 5) \%>\% interrogate() }\if{html}{\out{
}} @@ -421,7 +421,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - col_vals_lt(columns = vars(c), value = 5) \%>\% + col_vals_lt(columns = c, value = 5) \%>\% dplyr::pull(c) #> [1] 1 1 1 2 3 4 }\if{html}{\out{
}} @@ -432,7 +432,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_lt(tbl, columns = vars(c), value = 5) +\if{html}{\out{
}}\preformatted{expect_col_vals_lt(tbl, columns = c, value = 5) }\if{html}{\out{
}} } @@ -441,7 +441,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{test_col_vals_lt(tbl, columns = vars(c), value = 5) +\if{html}{\out{
}}\preformatted{test_col_vals_lt(tbl, columns = c, value = 5) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_lte.Rd b/man/col_vals_lte.Rd index 54049914c..ca4718c3a 100644 --- a/man/col_vals_lte.Rd +++ b/man/col_vals_lte.Rd @@ -330,7 +330,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_lte( - columns = vars(a), + columns = a, value = 1, na_pass = TRUE, preconditions = ~ . \%>\% dplyr::filter(a < 10), @@ -400,7 +400,7 @@ Validate that values in column \code{c} are all less than or equal to the value \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_lte(columns = vars(c), value = 4) \%>\% + col_vals_lte(columns = c, value = 4) \%>\% interrogate() }\if{html}{\out{
}} @@ -422,7 +422,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - col_vals_lte(columns = vars(c), value = 4) \%>\% + col_vals_lte(columns = c, value = 4) \%>\% dplyr::pull(c) #> [1] 1 1 1 2 3 4 }\if{html}{\out{
}} @@ -433,7 +433,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_lte(tbl, columns = vars(c), value = 4) +\if{html}{\out{
}}\preformatted{expect_col_vals_lte(tbl, columns = c, value = 4) }\if{html}{\out{
}} } @@ -442,7 +442,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{test_col_vals_lte(tbl, columns = vars(c), value = 4) +\if{html}{\out{
}}\preformatted{test_col_vals_lte(tbl, columns = c, value = 4) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_make_set.Rd b/man/col_vals_make_set.Rd index de82d9c57..07d4f3e1f 100644 --- a/man/col_vals_make_set.Rd +++ b/man/col_vals_make_set.Rd @@ -312,7 +312,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_make_set( - columns = vars(a), + columns = a, set = c(1, 2, 3, 4), preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), @@ -382,7 +382,7 @@ failing test units (there are 4 test units). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% col_vals_make_set( - columns = vars(f), set = c("low", "mid", "high") + columns = f, set = c("low", "mid", "high") ) \%>\% interrogate() }\if{html}{\out{
}} @@ -406,7 +406,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% col_vals_make_set( - columns = vars(f), set = c("low", "mid", "high") + columns = f, set = c("low", "mid", "high") ) \%>\% dplyr::pull(f) \%>\% unique() @@ -421,7 +421,7 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_make_set( small_table, - columns = vars(f), set = c("low", "mid", "high") + columns = f, set = c("low", "mid", "high") ) }\if{html}{\out{
}} } @@ -433,7 +433,7 @@ us. \if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_make_set( - columns = vars(f), set = c("low", "mid", "high") + columns = f, set = c("low", "mid", "high") ) #> [1] TRUE }\if{html}{\out{
}} diff --git a/man/col_vals_make_subset.Rd b/man/col_vals_make_subset.Rd index d3031784a..bbb4da23d 100644 --- a/man/col_vals_make_subset.Rd +++ b/man/col_vals_make_subset.Rd @@ -308,7 +308,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_make_subset( - columns = vars(a), + columns = a, set = c(1, 2, 3, 4), preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), @@ -379,7 +379,7 @@ units (there are 2 test units, one per element in the \code{set}). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% col_vals_make_subset( - columns = vars(f), set = c("low", "high") + columns = f, set = c("low", "high") ) \%>\% interrogate() }\if{html}{\out{
}} @@ -403,7 +403,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% col_vals_make_subset( - columns = vars(f), set = c("low", "high") + columns = f, set = c("low", "high") ) \%>\% dplyr::pull(f) \%>\% unique() @@ -418,7 +418,7 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_make_subset( small_table, - columns = vars(f), set = c("low", "high") + columns = f, set = c("low", "high") ) }\if{html}{\out{
}} } @@ -430,7 +430,7 @@ us. \if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_make_subset( - columns = vars(f), set = c("low", "high") + columns = f, set = c("low", "high") ) #> [1] TRUE }\if{html}{\out{
}} diff --git a/man/col_vals_not_between.Rd b/man/col_vals_not_between.Rd index f2ce20cef..c290da175 100644 --- a/man/col_vals_not_between.Rd +++ b/man/col_vals_not_between.Rd @@ -358,7 +358,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_not_between( - columns = vars(a), + columns = a, left = 1, right = 2, inclusive = c(TRUE, FALSE), @@ -434,7 +434,7 @@ units (there are 13 test units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% col_vals_not_between( - columns = vars(c), + columns = c, left = 10, right = 20, na_pass = TRUE ) \%>\% @@ -460,7 +460,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% col_vals_not_between( - columns = vars(c), + columns = c, left = 10, right = 20, na_pass = TRUE ) \%>\% @@ -475,7 +475,7 @@ With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_not_between( - small_table, columns = vars(c), + small_table, columns = c, left = 10, right = 20, na_pass = TRUE ) @@ -489,7 +489,7 @@ us. \if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_not_between( - columns = vars(c), + columns = c, left = 10, right = 20, na_pass = TRUE ) @@ -506,7 +506,7 @@ In changing the lower bound to be \code{9} and making it non-inclusive, we get \if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_not_between( - columns = vars(c), + columns = c, left = 9, right = 20, inclusive = c(FALSE, TRUE), na_pass = TRUE diff --git a/man/col_vals_not_equal.Rd b/man/col_vals_not_equal.Rd index f3ddb70d3..61aa4e63e 100644 --- a/man/col_vals_not_equal.Rd +++ b/man/col_vals_not_equal.Rd @@ -327,7 +327,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_not_equal( - columns = vars(a), + columns = a, value = 1, na_pass = TRUE, preconditions = ~ . \%>\% dplyr::filter(a < 10), @@ -397,7 +397,7 @@ test units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_not_equal(columns = vars(a), value = 6) \%>\% + col_vals_not_equal(columns = a, value = 6) \%>\% interrogate() }\if{html}{\out{
}} @@ -419,7 +419,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - col_vals_not_equal(columns = vars(a), value = 6) \%>\% + col_vals_not_equal(columns = a, value = 6) \%>\% dplyr::pull(a) #> [1] 5 5 5 5 5 5 }\if{html}{\out{
}} @@ -430,7 +430,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_not_equal(tbl, columns = vars(a), value = 6) +\if{html}{\out{
}}\preformatted{expect_col_vals_not_equal(tbl, columns = a, value = 6) }\if{html}{\out{
}} } @@ -439,7 +439,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{test_col_vals_not_equal(tbl, columns = vars(a), value = 6) +\if{html}{\out{
}}\preformatted{test_col_vals_not_equal(tbl, columns = a, value = 6) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_not_in_set.Rd b/man/col_vals_not_in_set.Rd index a3b041737..97082563e 100644 --- a/man/col_vals_not_in_set.Rd +++ b/man/col_vals_not_in_set.Rd @@ -308,7 +308,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_not_in_set( - columns = vars(a), + columns = a, set = c(1, 2, 3, 4), preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), @@ -359,7 +359,7 @@ and \code{highs}. We'll determine if this validation has any failing test units \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% col_vals_not_in_set( - columns = vars(f), set = c("lows", "mids", "highs") + columns = f, set = c("lows", "mids", "highs") ) \%>\% interrogate() }\if{html}{\out{
}} @@ -383,7 +383,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% col_vals_not_in_set( - columns = vars(f), set = c("lows", "mids", "highs") + columns = f, set = c("lows", "mids", "highs") ) \%>\% dplyr::pull(f) \%>\% unique() @@ -397,7 +397,7 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_not_in_set( small_table, - columns = vars(f), set = c("lows", "mids", "highs") + columns = f, set = c("lows", "mids", "highs") ) }\if{html}{\out{
}} } @@ -409,7 +409,7 @@ us. \if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_not_in_set( - columns = vars(f), set = c("lows", "mids", "highs") + columns = f, set = c("lows", "mids", "highs") ) #> [1] TRUE }\if{html}{\out{
}} diff --git a/man/col_vals_not_null.Rd b/man/col_vals_not_null.Rd index 425e15f43..11a8ac8e3 100644 --- a/man/col_vals_not_null.Rd +++ b/man/col_vals_not_null.Rd @@ -289,7 +289,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_not_null( - columns = vars(a), + columns = a, preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -353,7 +353,7 @@ row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_not_null(columns = vars(b)) \%>\% + col_vals_not_null(columns = b) \%>\% interrogate() }\if{html}{\out{
}} @@ -375,7 +375,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - col_vals_not_null(columns = vars(b)) \%>\% + col_vals_not_null(columns = b) \%>\% dplyr::pull(b) #> [1] 7 1 0 0 0 }\if{html}{\out{
}} @@ -386,7 +386,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_not_null(tbl, columns = vars(b)) +\if{html}{\out{
}}\preformatted{expect_col_vals_not_null(tbl, columns = b) }\if{html}{\out{
}} } @@ -395,7 +395,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_vals_not_null(columns = vars(b)) +\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_vals_not_null(columns = b) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_null.Rd b/man/col_vals_null.Rd index 281344d5c..cfbaf4a06 100644 --- a/man/col_vals_null.Rd +++ b/man/col_vals_null.Rd @@ -288,7 +288,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_null( - columns = vars(a), + columns = a, preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -352,7 +352,7 @@ row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - col_vals_null(columns = vars(c)) \%>\% + col_vals_null(columns = c) \%>\% interrogate() }\if{html}{\out{
}} @@ -374,7 +374,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - col_vals_null(columns = vars(c)) \%>\% + col_vals_null(columns = c) \%>\% dplyr::pull(c) #> [1] NA NA NA NA NA }\if{html}{\out{
}} @@ -385,7 +385,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_null(tbl, columns = vars(c)) +\if{html}{\out{
}}\preformatted{expect_col_vals_null(tbl, columns = c) }\if{html}{\out{
}} } @@ -394,7 +394,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_vals_null(columns = vars(c)) +\if{html}{\out{
}}\preformatted{tbl \%>\% test_col_vals_null(columns = c) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_regex.Rd b/man/col_vals_regex.Rd index dd65cb4f0..bdc89bd37 100644 --- a/man/col_vals_regex.Rd +++ b/man/col_vals_regex.Rd @@ -326,7 +326,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_regex( - columns = vars(a), + columns = a, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}", na_pass = TRUE, preconditions = ~ . \%>\% dplyr::filter(a < 10), @@ -399,7 +399,7 @@ units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = small_table) \%>\% - col_vals_regex(columns = vars(b), regex = pattern) \%>\% + col_vals_regex(columns = b, regex = pattern) \%>\% interrogate() }\if{html}{\out{
}} @@ -421,7 +421,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{small_table \%>\% - col_vals_regex(columns = vars(b), regex = pattern) \%>\% + col_vals_regex(columns = b, regex = pattern) \%>\% dplyr::slice(1:5) #> # A tibble: 5 x 8 #> date_time date a b c d e f @@ -439,7 +439,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_col_vals_regex(small_table, columns = vars(b), regex = pattern) +\if{html}{\out{
}}\preformatted{expect_col_vals_regex(small_table, columns = b, regex = pattern) }\if{html}{\out{
}} } @@ -448,7 +448,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_regex(columns = vars(b), regex = pattern) +\if{html}{\out{
}}\preformatted{small_table \%>\% test_col_vals_regex(columns = b, regex = pattern) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/col_vals_within_spec.Rd b/man/col_vals_within_spec.Rd index 5ad799179..1f426abd5 100644 --- a/man/col_vals_within_spec.Rd +++ b/man/col_vals_within_spec.Rd @@ -379,7 +379,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% col_vals_within_spec( - columns = vars(a), + columns = a, spec = "email", na_pass = TRUE, preconditions = ~ . \%>\% dplyr::filter(b < 10), @@ -447,7 +447,7 @@ units, one for each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = spec_slice) \%>\% col_vals_within_spec( - columns = vars(email_addresses), + columns = email_addresses, spec = "email" ) \%>\% interrogate() @@ -472,7 +472,7 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{spec_slice \%>\% col_vals_within_spec( - columns = vars(email_addresses), + columns = email_addresses, spec = "email" ) \%>\% dplyr::select(email_addresses) @@ -494,7 +494,7 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_col_vals_within_spec( spec_slice, - columns = vars(email_addresses), + columns = email_addresses, spec = "email" ) }\if{html}{\out{
}} @@ -507,7 +507,7 @@ us. \if{html}{\out{
}}\preformatted{spec_slice \%>\% test_col_vals_within_spec( - columns = vars(email_addresses), + columns = email_addresses, spec = "email" ) #> [1] TRUE diff --git a/man/conjointly.Rd b/man/conjointly.Rd index 1da906c83..4c954bda9 100644 --- a/man/conjointly.Rd +++ b/man/conjointly.Rd @@ -51,7 +51,7 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} A collection one-sided formulas that consist of validation functions that validate row units (the \verb{col_vals_*()} series), column existence (\code{\link[=col_exists]{col_exists()}}), or column type (the \verb{col_is_*()} series). An example of -this is \verb{~ col_vals_gte(., vars(a), 5.5), ~ col_vals_not_null(., vars(b)}).} +this is \verb{~ col_vals_gte(., a, 5.5), ~ col_vals_not_null(., b}).} \item{.list}{\emph{Alternative to \code{...}} @@ -321,9 +321,9 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% conjointly( - ~ col_vals_lt(., columns = vars(a), value = 8), - ~ col_vals_gt(., columns = vars(c), value = vars(a)), - ~ col_vals_not_null(., columns = vars(b)), + ~ col_vals_lt(., columns = a, value = 8), + ~ col_vals_gt(., columns = c, value = vars(a)), + ~ col_vals_not_null(., columns = b), preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -337,9 +337,9 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - conjointly: fns: - - ~col_vals_lt(., columns = vars(a), value = 8) - - ~col_vals_gt(., columns = vars(c), value = vars(a)) - - ~col_vals_not_null(., columns = vars(b)) + - ~col_vals_lt(., columns = a, value = 8) + - ~col_vals_gt(., columns = c, value = vars(a)) + - ~col_vals_not_null(., columns = b) preconditions: ~. \%>\% dplyr::filter(a < 10) segments: b ~ c("group_1", "group_2") actions: @@ -391,9 +391,9 @@ each row). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% conjointly( - ~ col_vals_lt(., columns = vars(a), value = 8), - ~ col_vals_gt(., columns = vars(c), value = vars(a)), - ~ col_vals_not_null(., columns = vars(b)) + ~ col_vals_lt(., columns = a, value = 8), + ~ col_vals_gt(., columns = c, value = vars(a)), + ~ col_vals_not_null(., columns = b) ) \%>\% interrogate() }\if{html}{\out{
}} @@ -422,9 +422,9 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% conjointly( - ~ col_vals_lt(., columns = vars(a), value = 8), - ~ col_vals_gt(., columns = vars(c), value = vars(a)), - ~ col_vals_not_null(., columns = vars(b)) + ~ col_vals_lt(., columns = a, value = 8), + ~ col_vals_gt(., columns = c, value = vars(a)), + ~ col_vals_not_null(., columns = b) ) #> # A tibble: 3 x 3 #> a b c @@ -442,9 +442,9 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_conjointly( tbl, - ~ col_vals_lt(., columns = vars(a), value = 8), - ~ col_vals_gt(., columns = vars(c), value = vars(a)), - ~ col_vals_not_null(., columns = vars(b)) + ~ col_vals_lt(., columns = a, value = 8), + ~ col_vals_gt(., columns = c, value = vars(a)), + ~ col_vals_not_null(., columns = b) ) }\if{html}{\out{
}} } @@ -456,9 +456,9 @@ us. \if{html}{\out{
}}\preformatted{tbl \%>\% test_conjointly( - ~ col_vals_lt(., columns = vars(a), value = 8), - ~ col_vals_gt(., columns = vars(c), value = vars(a)), - ~ col_vals_not_null(., columns = vars(b)) + ~ col_vals_lt(., columns = a, value = 8), + ~ col_vals_gt(., columns = c, value = vars(a)), + ~ col_vals_not_null(., columns = b) ) #> [1] TRUE }\if{html}{\out{
}} diff --git a/man/create_agent.Rd b/man/create_agent.Rd index a8cfeab8d..7977cc952 100644 --- a/man/create_agent.Rd +++ b/man/create_agent.Rd @@ -412,16 +412,16 @@ to actually perform the validations and gather intel. \if{html}{\out{
}}\preformatted{agent <- agent \%>\% - col_exists(columns = vars(date, date_time)) \%>\% + col_exists(columns = date, date_time) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}" ) \%>\% rows_distinct() \%>\% - col_vals_gt(columns = vars(d), value = 100) \%>\% - col_vals_lte(columns = vars(c), value = 5) \%>\% + col_vals_gt(columns = d, value = 100) \%>\% + col_vals_lte(columns = c, value = 5) \%>\% col_vals_between( - columns = vars(c), + columns = c, left = vars(a), right = vars(d), na_pass = TRUE ) \%>\% diff --git a/man/create_multiagent.Rd b/man/create_multiagent.Rd index 8f6cf4e6b..2740aa25e 100644 --- a/man/create_multiagent.Rd +++ b/man/create_multiagent.Rd @@ -110,7 +110,7 @@ First up, is \code{agent_1}: tbl_name = "tbl_1", label = "Example table 1." ) \%>\% - col_vals_gt(columns = vars(a), value = 4) \%>\% + col_vals_gt(columns = a, value = 4) \%>\% interrogate() }\if{html}{\out{
}} @@ -122,7 +122,7 @@ Then, \code{agent_2}: tbl_name = "tbl_2", label = "Example table 2." ) \%>\% - col_is_character(columns = vars(b)) \%>\% + col_is_character(columns = b) \%>\% interrogate() }\if{html}{\out{
}} diff --git a/man/deactivate_steps.Rd b/man/deactivate_steps.Rd index 4158d0cba..6a0b69f4c 100644 --- a/man/deactivate_steps.Rd +++ b/man/deactivate_steps.Rd @@ -51,9 +51,9 @@ agent_1 <- tbl_name = "small_table", label = "An example." ) \%>\% - col_exists(columns = vars(date)) \%>\% + col_exists(columns = date) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]{3}-[0-9]" ) \%>\% interrogate() diff --git a/man/draft_validation.Rd b/man/draft_validation.Rd index d07b849ed..ba3ac212a 100644 --- a/man/draft_validation.Rd +++ b/man/draft_validation.Rd @@ -170,116 +170,116 @@ agent <- ) \%>\% # Expect that column `name` is of type: character col_is_character( - columns = vars(name) + columns = name ) \%>\% # Expect that column `year` is of type: numeric col_is_numeric( - columns = vars(year) + columns = year ) \%>\% # Expect that values in `year` should be between `1975` and `2020` col_vals_between( - columns = vars(year), + columns = year, left = 1975, right = 2020 ) \%>\% # Expect that column `month` is of type: numeric col_is_numeric( - columns = vars(month) + columns = month ) \%>\% # Expect that values in `month` should be between `1` and `12` col_vals_between( - columns = vars(month), + columns = month, left = 1, right = 12 ) \%>\% # Expect that column `day` is of type: integer col_is_integer( - columns = vars(day) + columns = day ) \%>\% # Expect that values in `day` should be between `1` and `31` col_vals_between( - columns = vars(day), + columns = day, left = 1, right = 31 ) \%>\% # Expect that column `hour` is of type: numeric col_is_numeric( - columns = vars(hour) + columns = hour ) \%>\% # Expect that values in `hour` should be between `0` and `23` col_vals_between( - columns = vars(hour), + columns = hour, left = 0, right = 23 ) \%>\% # Expect that column `lat` is of type: numeric col_is_numeric( - columns = vars(lat) + columns = lat ) \%>\% # Expect that values in `lat` should be between `-90` and `90` col_vals_between( - columns = vars(lat), + columns = lat, left = -90, right = 90 ) \%>\% # Expect that column `long` is of type: numeric col_is_numeric( - columns = vars(long) + columns = long ) \%>\% # Expect that values in `long` should be between `-180` and `180` col_vals_between( - columns = vars(long), + columns = long, left = -180, right = 180 ) \%>\% # Expect that column `status` is of type: character col_is_character( - columns = vars(status) + columns = status ) \%>\% # Expect that column `category` is of type: factor col_is_factor( - columns = vars(category) + columns = category ) \%>\% # Expect that column `wind` is of type: integer col_is_integer( - columns = vars(wind) + columns = wind ) \%>\% # Expect that values in `wind` should be between `10` and `160` col_vals_between( - columns = vars(wind), + columns = wind, left = 10, right = 160 ) \%>\% # Expect that column `pressure` is of type: integer col_is_integer( - columns = vars(pressure) + columns = pressure ) \%>\% # Expect that values in `pressure` should be between `882` and `1022` col_vals_between( - columns = vars(pressure), + columns = pressure, left = 882, right = 1022 ) \%>\% # Expect that column `tropicalstorm_force_diameter` is of type: integer col_is_integer( - columns = vars(tropicalstorm_force_diameter) + columns = tropicalstorm_force_diameter ) \%>\% # Expect that values in `tropicalstorm_force_diameter` should be between # `0` and `870` col_vals_between( - columns = vars(tropicalstorm_force_diameter), + columns = tropicalstorm_force_diameter, left = 0, right = 870, na_pass = TRUE ) \%>\% # Expect that column `hurricane_force_diameter` is of type: integer col_is_integer( - columns = vars(hurricane_force_diameter) + columns = hurricane_force_diameter ) \%>\% # Expect that values in `hurricane_force_diameter` should be between # `0` and `300` col_vals_between( - columns = vars(hurricane_force_diameter), + columns = hurricane_force_diameter, left = 0, right = 300, na_pass = TRUE diff --git a/man/export_report.Rd b/man/export_report.Rd index 5f6319842..742d2bbdc 100644 --- a/man/export_report.Rd +++ b/man/export_report.Rd @@ -88,14 +88,14 @@ many validation functions as we want. Then, we \code{\link[=interrogate]{interro \if{html}{\out{
}}\preformatted{agent <- agent \%>\% - col_exists(columns = vars(date, date_time)) \%>\% + col_exists(columns = c(date, date_time)) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}" ) \%>\% rows_distinct() \%>\% - col_vals_gt(columns = vars(d), value = 100) \%>\% - col_vals_lte(columns = vars(c), value = 5) \%>\% + col_vals_gt(columns = d, value = 100) \%>\% + col_vals_lte(columns = c, value = 5) \%>\% interrogate() }\if{html}{\out{
}} @@ -147,7 +147,7 @@ integrated into the text. fn = snip_lowest(column = "a") ) \%>\% info_columns( - columns = vars(a), + columns = a, info = "From \{low_a\} to \{high_a\}." ) \%>\% info_columns( diff --git a/man/file_tbl.Rd b/man/file_tbl.Rd index 14382a5c5..2a72b1e42 100644 --- a/man/file_tbl.Rd +++ b/man/file_tbl.Rd @@ -115,7 +115,7 @@ A different strategy is to provide the data-reading function call directly to col_types = "TDdcddlc" ) ) \%>\% - col_vals_gt(columns = vars(a), value = 0) + col_vals_gt(columns = a, value = 0) }\if{html}{\out{
}} All of the file-reading instructions are encapsulated in the \code{tbl} expression @@ -142,7 +142,7 @@ gets the same CSV file from the GitHub repository for the pointblank package. tbl_name = "small_table", label = "`file_tbl()` example.", ) \%>\% - col_vals_gt(columns = vars(a), value = 0) \%>\% + col_vals_gt(columns = a, value = 0) \%>\% interrogate() }\if{html}{\out{
}} diff --git a/man/get_agent_report.Rd b/man/get_agent_report.Rd index ca3613cbe..e0c8a5366 100644 --- a/man/get_agent_report.Rd +++ b/man/get_agent_report.Rd @@ -211,7 +211,7 @@ greater than \code{4}. tbl_name = "small_table", label = "An example." ) \%>\% - col_vals_gt(columns = vars(a), value = 4) \%>\% + col_vals_gt(columns = a, value = 4) \%>\% interrogate() }\if{html}{\out{
}} diff --git a/man/get_agent_x_list.Rd b/man/get_agent_x_list.Rd index 0f9acaaa1..653787c3f 100644 --- a/man/get_agent_x_list.Rd +++ b/man/get_agent_x_list.Rd @@ -136,8 +136,8 @@ validation step functions, then interrogate. tbl = tbl, actions = al ) \%>\% - col_vals_gt(columns = vars(a), value = 7) \%>\% - col_is_numeric(columns = vars(a)) \%>\% + col_vals_gt(columns = a, value = 7) \%>\% + col_is_numeric(columns = a) \%>\% interrogate() }\if{html}{\out{
}} diff --git a/man/get_data_extracts.Rd b/man/get_data_extracts.Rd index 01d6c9fba..9dfc45f26 100644 --- a/man/get_data_extracts.Rd +++ b/man/get_data_extracts.Rd @@ -65,7 +65,7 @@ part of the \code{small_table} object. Use \code{\link[=interrogate]{interrogate ) \%>\% col_vals_gt(vars(d), value = 1000) \%>\% col_vals_between( - columns = vars(c), + columns = c, left = vars(a), right = vars(d), na_pass = TRUE ) \%>\% diff --git a/man/get_multiagent_report.Rd b/man/get_multiagent_report.Rd index 05847840d..d37215ecd 100644 --- a/man/get_multiagent_report.Rd +++ b/man/get_multiagent_report.Rd @@ -158,32 +158,32 @@ steps are created and the agent will interrogate the \code{small_table}. actions = al ) \%>\% col_vals_gt( - columns = vars(date_time), + columns = date_time, value = vars(date), na_pass = TRUE ) \%>\% col_vals_gt( - columns = vars(b), + columns = b, value = vars(g), na_pass = TRUE ) \%>\% rows_distinct() \%>\% col_vals_equal( - columns = vars(d), + columns = d, value = vars(d), na_pass = TRUE ) \%>\% col_vals_between( - columns = vars(c), + columns = c, left = vars(a), right = vars(d) ) \%>\% col_vals_not_between( - columns = vars(c), + columns = c, left = 10, right = 20, na_pass = TRUE ) \%>\% - rows_distinct(columns = vars(d, e, f)) \%>\% - col_is_integer(columns = vars(a)) \%>\% + rows_distinct(columns = d, e, f) \%>\% + col_is_integer(columns = a) \%>\% interrogate() }\if{html}{\out{
}} @@ -192,9 +192,9 @@ two more (the last of which is inactive). \if{html}{\out{
}}\preformatted{agent_2 <- agent_1 \%>\% - col_exists(columns = vars(date, date_time)) \%>\% + col_exists(columns = date, date_time) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}", active = FALSE ) \%>\% @@ -207,7 +207,7 @@ one, and deactivates the first. \if{html}{\out{
}}\preformatted{agent_3 <- agent_2 \%>\% col_vals_in_set( - columns = vars(f), + columns = f, set = c("low", "mid", "high") ) \%>\% remove_steps(i = 5) \%>\% diff --git a/man/get_sundered_data.Rd b/man/get_sundered_data.Rd index c2fdce8d7..e605a0a3d 100644 --- a/man/get_sundered_data.Rd +++ b/man/get_sundered_data.Rd @@ -84,9 +84,9 @@ validation plan into action. dplyr::select(a:f), label = "`get_sundered_data()`" ) \%>\% - col_vals_gt(columns = vars(d), value = 1000) \%>\% + col_vals_gt(columns = d, value = 1000) \%>\% col_vals_between( - columns = vars(c), + columns = c, left = vars(a), right = vars(d), na_pass = TRUE ) \%>\% diff --git a/man/get_tt_param.Rd b/man/get_tt_param.Rd index 3135f94d9..03db34e79 100644 --- a/man/get_tt_param.Rd +++ b/man/get_tt_param.Rd @@ -94,7 +94,7 @@ the first quarter of the year, we can supply a value from \code{stats_tbl} to keep = "right" ) \%>\% test_col_vals_lte( - columns = vars(session_duration), + columns = session_duration, value = get_tt_param( tbl = stats_tbl, param = "max", diff --git a/man/incorporate.Rd b/man/incorporate.Rd index ea49f51cc..d715674ba 100644 --- a/man/incorporate.Rd +++ b/man/incorporate.Rd @@ -76,7 +76,7 @@ use \code{incorporate()} to work the snippets into the info text. fn = ~ . \%>\% ncol() ) \%>\% info_columns( - columns = vars(a), + columns = a, info = "In the range of 1 to 10. ((SIMPLE))" ) \%>\% info_columns( diff --git a/man/info_columns.Rd b/man/info_columns.Rd index ed05f1719..caa0698d1 100644 --- a/man/info_columns.Rd +++ b/man/info_columns.Rd @@ -126,7 +126,7 @@ informant \%>\% info = "*info text* 3. Statistics: \{snippet_1\}." ) \%>\% info_columns( - columns = vars(date, date_time), + columns = c(date, date_time), info = "UTC time." ) @@ -185,7 +185,7 @@ existing if it lands in the same area). \if{html}{\out{
}}\preformatted{informant <- informant \%>\% info_columns( - columns = vars(a), + columns = a, info = "In the range of 1 to 10. ((SIMPLE))" ) \%>\% info_columns( diff --git a/man/info_snippet.Rd b/man/info_snippet.Rd index 82d9a3e91..e6833efa0 100644 --- a/man/info_snippet.Rd +++ b/man/info_snippet.Rd @@ -135,7 +135,7 @@ the highest value in that column). fn = snip_highest(column = "a") ) \%>\% info_columns( - columns = vars(a), + columns = a, info = "In the range of 1 to \{max_a\}. ((SIMPLE))" ) \%>\% info_columns( diff --git a/man/interrogate.Rd b/man/interrogate.Rd index 2a3f94fb0..65edb9f01 100644 --- a/man/interrogate.Rd +++ b/man/interrogate.Rd @@ -106,7 +106,7 @@ process. tbl = tbl, label = "`interrogate()` example" ) \%>\% - col_vals_gt(columns = vars(a), value = 5) \%>\% + col_vals_gt(columns = a, value = 5) \%>\% interrogate() }\if{html}{\out{
}} diff --git a/man/log4r_step.Rd b/man/log4r_step.Rd index 0ef02bab7..7404623c4 100644 --- a/man/log4r_step.Rd +++ b/man/log4r_step.Rd @@ -129,8 +129,8 @@ then \code{\link[=interrogate]{interrogate()}} the data. label = "An example.", actions = al ) \%>\% - col_vals_gt(columns = vars(d), 300) \%>\% - col_vals_in_set(columns = vars(f), c("low", "high")) \%>\% + col_vals_gt(columns = d, 300) \%>\% + col_vals_in_set(columns = f, c("low", "high")) \%>\% interrogate() agent diff --git a/man/remove_steps.Rd b/man/remove_steps.Rd index 49d4df3b5..ff4aa4af4 100644 --- a/man/remove_steps.Rd +++ b/man/remove_steps.Rd @@ -51,9 +51,9 @@ agent_1 <- tbl_name = "small_table", label = "An example." ) \%>\% - col_exists(columns = vars(date)) \%>\% + col_exists(columns = date) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]{3}-[0-9]" ) \%>\% interrogate() diff --git a/man/rows_complete.Rd b/man/rows_complete.Rd index 8152b3297..7ba180327 100644 --- a/man/rows_complete.Rd +++ b/man/rows_complete.Rd @@ -281,7 +281,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% rows_complete( - columns = vars(a, b), + columns = a, b, preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -343,7 +343,7 @@ only complete rows (i.e., all rows have no \code{NA} values). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - rows_complete(columns = vars(a, b)) \%>\% + rows_complete(columns = c(a, b)) \%>\% interrogate() }\if{html}{\out{
}} @@ -365,7 +365,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - rows_complete(columns = vars(a, b)) \%>\% + rows_complete(columns = c(a, b)) \%>\% dplyr::pull(a) #> [1] 5 7 6 5 8 7 }\if{html}{\out{
}} @@ -376,7 +376,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_rows_complete(tbl, columns = vars(a, b)) +\if{html}{\out{
}}\preformatted{expect_rows_complete(tbl, columns = c(a, b)) }\if{html}{\out{
}} } @@ -385,7 +385,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{test_rows_complete(tbl, columns = vars(a, b)) +\if{html}{\out{
}}\preformatted{test_rows_complete(tbl, columns = c(a, b)) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/rows_distinct.Rd b/man/rows_distinct.Rd index 4af7c79ec..e15b787e5 100644 --- a/man/rows_distinct.Rd +++ b/man/rows_distinct.Rd @@ -282,7 +282,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% rows_distinct( - columns = vars(a, b), + columns = c(a, b), preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -344,7 +344,7 @@ duplicate rows (i.e., all rows are distinct). \if{html}{\out{
}}\preformatted{agent <- create_agent(tbl = tbl) \%>\% - rows_distinct(columns = vars(a, b)) \%>\% + rows_distinct(columns = c(a, b)) \%>\% interrogate() }\if{html}{\out{
}} @@ -366,7 +366,7 @@ through but should \code{stop()} if there is a single test unit failing. The behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% - rows_distinct(columns = vars(a, b)) \%>\% + rows_distinct(columns = c(a, b)) \%>\% dplyr::pull(a) #> [1] 5 7 6 5 8 7 }\if{html}{\out{
}} @@ -377,7 +377,7 @@ behavior of side effects can be customized with the \code{actions} option. With the \verb{expect_*()} form, we would typically perform one validation at a time. This is primarily used in \strong{testthat} tests. -\if{html}{\out{
}}\preformatted{expect_rows_distinct(tbl, columns = vars(a, b)) +\if{html}{\out{
}}\preformatted{expect_rows_distinct(tbl, columns = c(a, b)) }\if{html}{\out{
}} } @@ -386,7 +386,7 @@ time. This is primarily used in \strong{testthat} tests. With the \verb{test_*()} form, we should get a single logical value returned to us. -\if{html}{\out{
}}\preformatted{test_rows_distinct(tbl, columns = vars(a, b)) +\if{html}{\out{
}}\preformatted{test_rows_distinct(tbl, columns = c(a, b)) #> [1] TRUE }\if{html}{\out{
}} } diff --git a/man/serially.Rd b/man/serially.Rd index 447b0f925..91f710da4 100644 --- a/man/serially.Rd +++ b/man/serially.Rd @@ -55,7 +55,7 @@ within the series. A finishing validation function call (e.g., \code{\link[=col_vals_increasing]{col_vals_increasing()}}, etc.) can optionally be inserted at the end of the series, serving as a validation step that only undergoes interrogation if the prior tests adequately pass. An example of this is -\verb{~ test_column_exists(., vars(a)), ~ col_vals_not_null(., vars(a))}).} +\verb{~ test_column_exists(., a), ~ col_vals_not_null(., a)}).} \item{.list}{\emph{Alternative to \code{...}} @@ -191,9 +191,9 @@ or any \code{segments}) Here's an example of how to arrange expressions: -\if{html}{\out{
}}\preformatted{~ test_col_exists(., columns = vars(count)), -~ test_col_is_numeric(., columns = vars(count)), -~ col_vals_gt(., columns = vars(count), value = 2) +\if{html}{\out{
}}\preformatted{~ test_col_exists(., columns = count), +~ test_col_is_numeric(., columns = count), +~ col_vals_gt(., columns = count, value = 2) }\if{html}{\out{
}} This series concentrates on the column called \code{count} and first checks @@ -306,9 +306,9 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% serially( - ~ col_vals_lt(., columns = vars(a), value = 8), - ~ col_vals_gt(., columns = vars(c), value = vars(a)), - ~ col_vals_not_null(., columns = vars(b)), + ~ col_vals_lt(., columns = a, value = 8), + ~ col_vals_gt(., columns = c, value = vars(a)), + ~ col_vals_not_null(., columns = b), preconditions = ~ . \%>\% dplyr::filter(a < 10), actions = action_levels(warn_at = 0.1, stop_at = 0.2), label = "The `serially()` step.", @@ -321,9 +321,9 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - serially: fns: - - ~col_vals_lt(., columns = vars(a), value = 8) - - ~col_vals_gt(., columns = vars(c), value = vars(a)) - - ~col_vals_not_null(., vars(b)) + - ~col_vals_lt(., columns = a, value = 8) + - ~col_vals_gt(., columns = c, value = vars(a)) + - ~col_vals_not_null(., b) preconditions: ~. \%>\% dplyr::filter(a < 10) actions: warn_fraction: 0.1 @@ -375,9 +375,9 @@ validation). \if{html}{\out{
}}\preformatted{agent_1 <- create_agent(tbl = tbl) \%>\% serially( - ~ test_col_is_numeric(., columns = vars(a, b)), - ~ test_col_vals_not_null(., columns = vars(a, b)), - ~ col_vals_gt(., columns = vars(b), value = vars(a)) + ~ test_col_is_numeric(., columns = c(a, b)), + ~ test_col_vals_not_null(., columns = c(a, b)), + ~ col_vals_gt(., columns = b, value = vars(a)) ) \%>\% interrogate() }\if{html}{\out{
}} @@ -401,8 +401,8 @@ serial tests are performed. \if{html}{\out{
}}\preformatted{agent_2 <- create_agent(tbl = tbl) \%>\% serially( - ~ test_col_is_numeric(., columns = vars(a, b)), - ~ test_col_vals_not_null(., columns = vars(a, b)) + ~ test_col_is_numeric(., columns = c(a, b)), + ~ test_col_vals_not_null(., columns = c(a, b)) ) \%>\% interrogate() }\if{html}{\out{
}} @@ -424,9 +424,9 @@ behavior of side effects can be customized with the \code{actions} option. \if{html}{\out{
}}\preformatted{tbl \%>\% serially( - ~ test_col_is_numeric(., columns = vars(a, b)), - ~ test_col_vals_not_null(., columns = vars(a, b)), - ~ col_vals_gt(., columns = vars(b), value = vars(a)) + ~ test_col_is_numeric(., columns = c(a, b)), + ~ test_col_vals_not_null(., columns = c(a, b)), + ~ col_vals_gt(., columns = b, value = vars(a)) ) #> # A tibble: 3 x 3 #> a b c @@ -444,9 +444,9 @@ time. This is primarily used in \strong{testthat} tests. \if{html}{\out{
}}\preformatted{expect_serially( tbl, - ~ test_col_is_numeric(., columns = vars(a, b)), - ~ test_col_vals_not_null(., columns = vars(a, b)), - ~ col_vals_gt(., columns = vars(b), value = vars(a)) + ~ test_col_is_numeric(., columns = c(a, b)), + ~ test_col_vals_not_null(., columns = c(a, b)), + ~ col_vals_gt(., columns = b, value = vars(a)) ) }\if{html}{\out{
}} } @@ -458,9 +458,9 @@ us. \if{html}{\out{
}}\preformatted{tbl \%>\% test_serially( - ~ test_col_is_numeric(., columns = vars(a, b)), - ~ test_col_vals_not_null(., columns = vars(a, b)), - ~ col_vals_gt(., columns = vars(b), value = vars(a)) + ~ test_col_is_numeric(., columns = c(a, b)), + ~ test_col_vals_not_null(., columns = c(a, b)), + ~ col_vals_gt(., columns = b, value = vars(a)) ) #> [1] TRUE }\if{html}{\out{
}} diff --git a/man/set_tbl.Rd b/man/set_tbl.Rd index e417ae6fe..1db904ce1 100644 --- a/man/set_tbl.Rd +++ b/man/set_tbl.Rd @@ -71,9 +71,9 @@ Apply the actions, add some validation steps and then interrogate the data. label = "An example.", actions = al ) \%>\% - col_exists(columns = vars(date, date_time)) \%>\% + col_exists(columns = c(date, date_time)) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}" ) \%>\% rows_distinct() \%>\% diff --git a/man/tbl_source.Rd b/man/tbl_source.Rd index d41c86712..d7ae0b390 100644 --- a/man/tbl_source.Rd +++ b/man/tbl_source.Rd @@ -55,7 +55,7 @@ some validation steps, and interrogate the table shortly thereafter. label = "`tbl_source()` example", actions = action_levels(warn_at = 0.10) ) \%>\% - col_exists(columns = vars(date, date_time)) \%>\% + col_exists(columns = c(date, date_time)) \%>\% interrogate() }\if{html}{\out{
}} diff --git a/man/tt_string_info.Rd b/man/tt_string_info.Rd index a0a0e38fb..1fa4231f1 100644 --- a/man/tt_string_info.Rd +++ b/man/tt_string_info.Rd @@ -52,11 +52,11 @@ numbers of characters (\code{15} and \code{24}, respectively) throughout the tab \if{html}{\out{
}}\preformatted{tt_string_info(tbl = game_revenue) \%>\% col_vals_equal( - columns = vars(player_id), + columns = player_id, value = 15 ) \%>\% col_vals_equal( - columns = vars(session_id), + columns = session_id, value = 24 ) #> # A tibble: 3 x 7 @@ -75,7 +75,7 @@ of the \code{small_table} dataset is no greater than \code{4}. \if{html}{\out{
}}\preformatted{tt_string_info(tbl = small_table) \%>\% test_col_vals_lte( - columns = vars(f), + columns = f, value = 4 ) #> [1] TRUE diff --git a/man/tt_summary_stats.Rd b/man/tt_summary_stats.Rd index 724ee26bb..ccc1e3bb5 100644 --- a/man/tt_summary_stats.Rd +++ b/man/tt_summary_stats.Rd @@ -65,7 +65,7 @@ ensure that the maximum revenue for individual purchases in the \if{html}{\out{
}}\preformatted{tt_summary_stats(tbl = game_revenue) \%>\% col_vals_lt( - columns = vars(item_revenue), + columns = item_revenue, value = 150, segments = .param. ~ "max" ) @@ -92,7 +92,7 @@ that the median revenue is somewhere between $8 and $12. dplyr::filter(item_type == "iap") \%>\% tt_summary_stats() \%>\% col_vals_between( - columns = vars(item_revenue), + columns = item_revenue, left = 8, right = 12, segments = .param. ~ "med" ) @@ -132,7 +132,7 @@ step that isolates the row of the median statistic. rows_complete() \%>\% rows_distinct() \%>\% col_vals_between( - columns = vars(item_revenue), + columns = item_revenue, left = 8, right = 12, preconditions = ~ . \%>\% dplyr::filter(item_type == "iap") \%>\% diff --git a/man/tt_tbl_colnames.Rd b/man/tt_tbl_colnames.Rd index 29d5ca449..154f40ade 100644 --- a/man/tt_tbl_colnames.Rd +++ b/man/tt_tbl_colnames.Rd @@ -55,7 +55,7 @@ table. Here, we check that \code{game_revenue} table, included in the \if{html}{\out{
}}\preformatted{tt_tbl_colnames(tbl = game_revenue) \%>\% test_col_vals_make_subset( - columns = vars(value), + columns = value, set = c("acquisition", "country") ) #> [1] TRUE @@ -70,7 +70,7 @@ combination of \code{tt_tbl_colnames()}, then \code{\link[=tt_string_info]{tt_st tt_tbl_colnames() \%>\% tt_string_info() \%>\% test_col_vals_lt( - columns = vars(value), + columns = value, value = 15 ) #> [1] FALSE diff --git a/man/tt_tbl_dims.Rd b/man/tt_tbl_dims.Rd index b605c91bd..5abafbb14 100644 --- a/man/tt_tbl_dims.Rd +++ b/man/tt_tbl_dims.Rd @@ -44,7 +44,7 @@ dimensions. Here, we check that \code{game_revenue} has at least \code{1500} row \if{html}{\out{
}}\preformatted{tt_tbl_dims(tbl = game_revenue) \%>\% dplyr::filter(.param. == "rows") \%>\% test_col_vals_gt( - columns = vars(value), + columns = value, value = 1500 ) #> [1] TRUE @@ -56,7 +56,7 @@ We can check \code{small_table} to ensure that number of columns is less than \if{html}{\out{
}}\preformatted{tt_tbl_dims(tbl = small_table) \%>\% dplyr::filter(.param. == "columns") \%>\% test_col_vals_lt( - columns = vars(value), + columns = value, value = 10 ) #> [1] TRUE diff --git a/man/write_testthat_file.Rd b/man/write_testthat_file.Rd index 0401b2e0a..59b901a4f 100644 --- a/man/write_testthat_file.Rd +++ b/man/write_testthat_file.Rd @@ -124,7 +124,7 @@ test_that("column `date_time` exists", \{ expect_col_exists( tbl, - columns = vars(date_time), + columns = date_time, threshold = 1 ) \}) @@ -133,7 +133,7 @@ test_that("values in `c` should be <= `5`", \{ expect_col_vals_lte( tbl, - columns = vars(c), + columns = c, value = 5, threshold = 0.25 ) @@ -150,8 +150,8 @@ agent <- tbl = ~ small_table, actions = action_levels(stop_at = 0.25) ) \%>\% - col_exists(vars(date_time)) \%>\% - col_vals_lte(vars(c), value = 5) + col_exists(date_time) \%>\% + col_vals_lte(c, value = 5) write_testthat_file( agent = agent, @@ -209,13 +209,13 @@ bit more useful after interrogation. label = "An example.", actions = al ) \%>\% - col_exists(vars(date, date_time)) \%>\% + col_exists(c(date, date_time)) \%>\% col_vals_regex( - vars(b), + b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}" ) \%>\% - col_vals_gt(vars(d), value = 100) \%>\% - col_vals_lte(vars(c), value = 5) \%>\% + col_vals_gt(d, value = 100) \%>\% + col_vals_lte(c, value = 5) \%>\% interrogate() }\if{html}{\out{
}} @@ -246,7 +246,7 @@ test_that("column `date` exists", \{ expect_col_exists( tbl, - columns = vars(date), + columns = date, threshold = 1 ) \}) @@ -255,7 +255,7 @@ test_that("column `date_time` exists", \{ expect_col_exists( tbl, - columns = vars(date_time), + columns = date_time, threshold = 1 ) \}) @@ -265,7 +265,7 @@ test_that("values in `b` should match the regular expression: expect_col_vals_regex( tbl, - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}", threshold = 0.25 ) @@ -275,7 +275,7 @@ test_that("values in `d` should be > `100`", \{ expect_col_vals_gt( tbl, - columns = vars(d), + columns = d, value = 100, threshold = 0.25 ) @@ -285,7 +285,7 @@ test_that("values in `c` should be <= `5`", \{ expect_col_vals_lte( tbl, - columns = vars(c), + columns = c, value = 5, threshold = 0.25 ) diff --git a/man/x_write_disk.Rd b/man/x_write_disk.Rd index 0d5115820..565d3340a 100644 --- a/man/x_write_disk.Rd +++ b/man/x_write_disk.Rd @@ -122,14 +122,14 @@ using as many validation functions as we want. After that, use \if{html}{\out{
}}\preformatted{agent <- agent \%>\% - col_exists(columns = vars(date, date_time)) \%>\% + col_exists(columns = c(date, date_time)) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}" ) \%>\% rows_distinct() \%>\% - col_vals_gt(columns = vars(d), value = 100) \%>\% - col_vals_lte(columns = vars(c), value = 5) \%>\% + col_vals_gt(columns = d, value = 100) \%>\% + col_vals_lte(columns = c, value = 5) \%>\% interrogate() }\if{html}{\out{
}} @@ -184,7 +184,7 @@ integrated into the text. fn = snip_lowest(column = "a") ) \%>\% info_columns( - columns = vars(a), + columns = a, info = "From \{low_a\} to \{high_a\}." ) \%>\% info_columns( @@ -226,13 +226,13 @@ validation steps, and \code{\link[=interrogate]{interrogate()}}. actions = al ) \%>\% col_vals_gt( - columns = vars(b), + columns = b, value = vars(g), na_pass = TRUE, label = "b > g" ) \%>\% col_is_character( - columns = vars(b, f), + columns = c(b, f), label = "Verifying character-type columns" ) \%>\% interrogate() diff --git a/man/yaml_agent_show_exprs.Rd b/man/yaml_agent_show_exprs.Rd index 3a205b0d7..2aea4582e 100644 --- a/man/yaml_agent_show_exprs.Rd +++ b/man/yaml_agent_show_exprs.Rd @@ -46,14 +46,14 @@ retrieval of the target table. notify_at = 0.35 ) ) \%>\% - col_exists(columns = vars(date, date_time)) \%>\% + col_exists(columns = c(date, date_time)) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}" ) \%>\% rows_distinct() \%>\% - col_vals_gt(columns = vars(d), value = 100) \%>\% - col_vals_lte(columns = vars(c), value = 5) + col_vals_gt(columns = d, value = 100) \%>\% + col_vals_lte(columns = c, value = 5) }\if{html}{\out{
}} The agent can be written to a \strong{pointblank} YAML file with \code{\link[=yaml_write]{yaml_write()}}. @@ -95,19 +95,19 @@ we can use \code{yaml_agent_show_exprs()}. label = "A simple example with the `small_table`." ) \%>\% col_exists( - columns = vars(date, date_time) + columns = c(date, date_time) ) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}" ) \%>\% rows_distinct() \%>\% col_vals_gt( - columns = vars(d), + columns = d, value = 100 ) \%>\% col_vals_lte( - columns = vars(c), + columns = c, value = 5 ) }\if{html}{\out{
}} diff --git a/man/yaml_write.Rd b/man/yaml_write.Rd index 5270b82f9..c28bf6066 100644 --- a/man/yaml_write.Rd +++ b/man/yaml_write.Rd @@ -144,14 +144,14 @@ using as many validation functions as we want. \if{html}{\out{
}}\preformatted{agent <- agent \%>\% - col_exists(columns = vars(date, date_time)) \%>\% + col_exists(columns = c(date, date_time)) \%>\% col_vals_regex( - columns = vars(b), + columns = b, regex = "[0-9]-[a-z]\{3\}-[0-9]\{3\}" ) \%>\% rows_distinct() \%>\% - col_vals_gt(columns = vars(d), value = 100) \%>\% - col_vals_lte(columns = vars(c), value = 5) + col_vals_gt(columns = d, value = 100) \%>\% + col_vals_lte(columns = c, value = 5) }\if{html}{\out{
}} The agent can be written to a \strong{pointblank}-readable YAML file with the @@ -280,7 +280,7 @@ using as many \verb{info_*()} functions as we want. \if{html}{\out{
}}\preformatted{informant <- informant \%>\% info_columns( - columns = vars(a), + columns = a, info = "In the range of 1 to 10. (SIMPLE)" ) \%>\% info_columns( @@ -288,7 +288,7 @@ using as many \verb{info_*()} functions as we want. info = "Time-based values (e.g., `Sys.time()`)." ) \%>\% info_columns( - columns = "date", + columns = date, info = "The date part of `date_time`. (CALC)" ) }\if{html}{\out{
}} From 2f603fe0ef865c3f6c2b82fbca6a06bce800e98c Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 12:15:48 -0400 Subject: [PATCH 05/46] fix serially() example in yaml section --- R/serially.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/serially.R b/R/serially.R index b1e0be717..cdb9f91ed 100644 --- a/R/serially.R +++ b/R/serially.R @@ -184,8 +184,8 @@ #' ```r #' agent %>% #' serially( -#' ~ col_vals_lt(., columns = a, value = 8), -#' ~ col_vals_gt(., columns = c, value = vars(a)), +#' ~ test_col_vals_lt(., columns = a, value = 8), +#' ~ test_col_vals_gt(., columns = c, value = vars(a)), #' ~ col_vals_not_null(., columns = b), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -200,9 +200,9 @@ #' steps: #' - serially: #' fns: -#' - ~col_vals_lt(., columns = a, value = 8) -#' - ~col_vals_gt(., columns = c, value = vars(a)) -#' - ~col_vals_not_null(., b) +#' - ~test_col_vals_lt(., columns = a, value = 8) +#' - ~test_col_vals_gt(., columns = c, value = vars(a)) +#' - ~col_vals_not_null(., columns = b) #' preconditions: ~. %>% dplyr::filter(a < 10) #' actions: #' warn_fraction: 0.1 From 7494a42569882b4697cd8e44c2cebada54e6e5be Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 15:50:09 -0400 Subject: [PATCH 06/46] allow passing dots down into eval_select() --- R/utils.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/utils.R b/R/utils.R index cf77f37b8..36b1f3950 100644 --- a/R/utils.R +++ b/R/utils.R @@ -222,12 +222,12 @@ is_secret_agent <- function(x) { is_ptblank_agent(x) && (x$label == "::QUIET::") } -resolve_columns <- function(x, var_expr, preconditions) { +resolve_columns <- function(x, var_expr, preconditions, ...) { force(x) # To avoid `restarting interrupted promise evaluation` warnings out <- tryCatch( - expr = resolve_columns_internal(x, var_expr, preconditions), + expr = resolve_columns_internal(x, var_expr, preconditions, ...), error = function(cnd) cnd ) @@ -245,7 +245,7 @@ resolve_columns <- function(x, var_expr, preconditions) { } -resolve_columns_internal <- function(x, var_expr, preconditions) { +resolve_columns_internal <- function(x, var_expr, preconditions, ...) { # Return NA if the expr is NULL if (rlang::quo_is_null(var_expr)) { @@ -282,7 +282,7 @@ resolve_columns_internal <- function(x, var_expr, preconditions) { } # Proceed with tidyselect - column <- tidyselect::eval_select(var_expr, tbl) + column <- tidyselect::eval_select(var_expr, tbl, ...) column <- names(column) if (length(column) < 1) { From 908a6ae1c6682e6c278d43af93bb342365399a50 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 15:51:13 -0400 Subject: [PATCH 07/46] fix bug in col_exists() allowing any arbitrary errors in column selection --- R/col_exists.R | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/R/col_exists.R b/R/col_exists.R index f63c07eaa..9c945c080 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -243,9 +243,20 @@ col_exists <- function( # Resolve the columns based on the expression ## Only for `col_exists()`: error gracefully if column not found columns <- tryCatch( - expr = resolve_columns(x = x, var_expr = columns, preconditions = NULL), - error = function(cnd) cnd$i %||% NA_character_ + expr = resolve_columns(x = x, var_expr = columns, preconditions = NULL, + allow_empty = FALSE), + error = function(cnd) cnd$i %||% cnd ) + if (rlang::is_error(columns)) { + cnd <- columns + # tidyselect 0-column selection should be rethrown + if (is.null(cnd$parent)) { + rlang::cnd_signal(cnd) + } else { + # Evaluation errors should be chained and rethrown + rlang::abort("Evaluation error in `columns`", parent = cnd$parent) + } + } if (is_a_table_object(x)) { From 050f89d8f9a88143820f3785fe450eeedbfe8cc1 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 15:51:31 -0400 Subject: [PATCH 08/46] test various column selection failure behaviors of col_exists() --- tests/testthat/test-tidyselect_integration.R | 65 +++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-tidyselect_integration.R b/tests/testthat/test-tidyselect_integration.R index feb1d5569..0f8020bd3 100644 --- a/tests/testthat/test-tidyselect_integration.R +++ b/tests/testthat/test-tidyselect_integration.R @@ -114,8 +114,7 @@ test_that("'NULL = select everything' behavior in rows_*() validation functions" }) -# tidyselect coverage for `col_exists()` -test_that("'NULL = select everything' behavior in rows_*() validation functions", { +test_that("tidyselect coverage for `col_exists()`", { # Reprex from (#433) df <- tibble::tibble( @@ -147,6 +146,68 @@ test_that("'NULL = select everything' behavior in rows_*() validation functions" }) +test_that("error/failure patterns for `col_exists`", { + + # Selecting non-existent columns signals failure + expect_error(expect_failure({ + small_table %>% + col_exists("z") + })) + expect_failure({ + small_table %>% + expect_col_exists("z") + }) + + # 0-column *tidyselect selection* should error + expect_error({ + small_table %>% + col_exists(starts_with("z")) + }) + expect_error({ + small_table %>% + expect_col_exists("z") + }) + + # Unrelated evaluation errors should be chained and rethrown + expect_error({ + small_table %>% + col_exists(stop("Error!")) + }, "Error!") + expect_error({ + small_table %>% + expect_col_exists(stop("Error!")) + }, "Error!") + expect_error({ + small_table %>% + test_col_exists(stop("Error!")) + }, "Error!") + + # Test should return FALSE for 0-column and non-existent column + expect_false({ + small_table %>% + test_col_exists("z") + }) + expect_false({ + small_table %>% + test_col_exists("z") + }) + + # No failure/error during validation + expect_no_error({ + agent_nonexist_col <- create_agent(small_table) %>% + col_exists("z") %>% + interrogate() + }) + expect_false(all_passed(agent_nonexist_col)) + expect_no_error({ + agent_tidyselect_0col <- create_agent(small_table) %>% + col_exists(starts_with("z")) %>% + interrogate() + }) + expect_false(all_passed(agent_nonexist_col)) + +}) + test_that("c()-expr works for serially", { # Example from `serially()` docs From 6a59cecb514166dbcca0c02aa3da29ef8f779b14 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 16:21:32 -0400 Subject: [PATCH 09/46] tidyselect 0-column selection in col_exists() should fail gracefully --- R/col_exists.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/col_exists.R b/R/col_exists.R index 9c945c080..9adafa922 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -249,9 +249,9 @@ col_exists <- function( ) if (rlang::is_error(columns)) { cnd <- columns - # tidyselect 0-column selection should be rethrown + # tidyselect 0-column selection should contextualize attempted column if (is.null(cnd$parent)) { - rlang::cnd_signal(cnd) + columns <- columns_expr } else { # Evaluation errors should be chained and rethrown rlang::abort("Evaluation error in `columns`", parent = cnd$parent) From 9dacc71e476c2efb6c69729164815a5e0a1bafdc Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 16:24:20 -0400 Subject: [PATCH 10/46] bring back old behavior of error when no `columns` provided to `col_exists()` --- R/col_exists.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/col_exists.R b/R/col_exists.R index 9adafa922..c7fb2704e 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -236,6 +236,11 @@ col_exists <- function( # Capture the `columns` expression columns <- rlang::enquo(columns) + # Require columns to be specified + if (rlang::quo_is_missing(columns)) { + stop('argument "columns" is missing, with no default') + } + # `NULL` = `everything()` if (rlang::quo_is_null(columns)) { columns <- rlang::quo(tidyselect::everything()) } From e3f967559876df8eaab48fbaafb6ee5110d6c6b0 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 16:24:48 -0400 Subject: [PATCH 11/46] resolve_columns() passes down validation call context --- R/utils.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/utils.R b/R/utils.R index 36b1f3950..7458b974b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -222,12 +222,14 @@ is_secret_agent <- function(x) { is_ptblank_agent(x) && (x$label == "::QUIET::") } -resolve_columns <- function(x, var_expr, preconditions, ...) { +resolve_columns <- function(x, var_expr, preconditions, ..., + call = rlang::caller_env()) { force(x) # To avoid `restarting interrupted promise evaluation` warnings out <- tryCatch( - expr = resolve_columns_internal(x, var_expr, preconditions, ...), + expr = resolve_columns_internal(x, var_expr, preconditions, ..., + call = call), error = function(cnd) cnd ) @@ -245,7 +247,7 @@ resolve_columns <- function(x, var_expr, preconditions, ...) { } -resolve_columns_internal <- function(x, var_expr, preconditions, ...) { +resolve_columns_internal <- function(x, var_expr, preconditions, ..., call) { # Return NA if the expr is NULL if (rlang::quo_is_null(var_expr)) { @@ -282,7 +284,7 @@ resolve_columns_internal <- function(x, var_expr, preconditions, ...) { } # Proceed with tidyselect - column <- tidyselect::eval_select(var_expr, tbl, ...) + column <- tidyselect::eval_select(var_expr, tbl, error_call = call, ...) column <- names(column) if (length(column) < 1) { From 2e889dc948458f7541dce7b72adec1c1790eedc2 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 16:26:18 -0400 Subject: [PATCH 12/46] fix typo in test --- tests/testthat/test-tidyselect_integration.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/testthat/test-tidyselect_integration.R b/tests/testthat/test-tidyselect_integration.R index 0f8020bd3..081e11932 100644 --- a/tests/testthat/test-tidyselect_integration.R +++ b/tests/testthat/test-tidyselect_integration.R @@ -158,12 +158,12 @@ test_that("error/failure patterns for `col_exists`", { expect_col_exists("z") }) - # 0-column *tidyselect selection* should error - expect_error({ + # 0-column tidyselect selection signals failure + expect_error(expect_failure({ small_table %>% col_exists(starts_with("z")) - }) - expect_error({ + })) + expect_failure({ small_table %>% expect_col_exists("z") }) @@ -204,7 +204,7 @@ test_that("error/failure patterns for `col_exists`", { col_exists(starts_with("z")) %>% interrogate() }) - expect_false(all_passed(agent_nonexist_col)) + expect_false(all_passed(agent_tidyselect_0col)) }) From 72a030e5284e2dc7074cc81cdee45089e278d22b Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 16:36:07 -0400 Subject: [PATCH 13/46] lintr --- R/col_exists.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/col_exists.R b/R/col_exists.R index c7fb2704e..8b577df52 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -240,7 +240,6 @@ col_exists <- function( if (rlang::quo_is_missing(columns)) { stop('argument "columns" is missing, with no default') } - # `NULL` = `everything()` if (rlang::quo_is_null(columns)) { columns <- rlang::quo(tidyselect::everything()) } From ee6136803dff2a9c9b6654d3e589e86d827b60c1 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 19:52:15 -0400 Subject: [PATCH 14/46] clean up yaml_agent_string() mutually exclusive arg logic --- R/yaml_write.R | 78 ++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 44 deletions(-) diff --git a/R/yaml_write.R b/R/yaml_write.R index 107dd1ffe..78bb0b8a1 100644 --- a/R/yaml_write.R +++ b/R/yaml_write.R @@ -649,52 +649,42 @@ yaml_agent_string <- function( expanded = FALSE ) { - if (is.null(agent) && is.null(filename)) { - stop( - "An `agent` object or a `filename` for a YAML file must be specified.", - call. = FALSE - ) - } - - if (!is.null(agent) && !is.null(filename)) { - stop( - "Only `agent` or `filename` should be specified (not both).", - call. = FALSE - ) - } - - if (!is.null(agent)) { - - # Display the agent's YAML as a nicely formatted string by - # generating the YAML (`as_agent_yaml_list() %>% as.yaml()`) and - # then emitting it to the console via `message()` - message( - as_agent_yaml_list( - agent = agent, - expanded = expanded - ) %>% - yaml::as.yaml( - handlers = list( - logical = function(x) { - result <- ifelse(x, "true", "false") - class(result) <- "verbatim" - result - } + switch( + rlang::check_exclusive(agent, filename), + agent = { + # Display the agent's YAML as a nicely formatted string by + # generating the YAML (`as_agent_yaml_list() %>% as.yaml()`) and + # then emitting it to the console via `message()` + message( + as_agent_yaml_list( + agent = agent, + expanded = expanded + ) %>% + yaml::as.yaml( + handlers = list( + logical = function(x) { + result <- ifelse(x, "true", "false") + class(result) <- "verbatim" + result + } + ) ) - ) - ) - - } else { - - if (!is.null(path)) { - filename <- file.path(path, filename) + ) + }, + filename = { + # Display the agent's YAML as a nicely formatted string by + # reading the YAML file specified by `file` (and perhaps `path`) + # and then emitting it to the console via `message()` + if (!is.null(path)) { + filename <- file.path(path, filename) + } + message( + readLines(filename) %>% + paste(collapse = "\n") + ) } - - # Display the agent's YAML as a nicely formatted string by - # reading the YAML file specified by `file` (and perhaps `path`) - # and then emitting it to the console via `message()` - message(readLines(filename) %>% paste(collapse = "\n")) - } + ) + } as_vars_fn <- function(columns) { From bde99bb065d98d95f562589b8e96d6a76e426ea0 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 20:16:37 -0400 Subject: [PATCH 15/46] default to c()-expr when writing columns to yaml --- R/yaml_write.R | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/R/yaml_write.R b/R/yaml_write.R index 78bb0b8a1..ff66322a1 100644 --- a/R/yaml_write.R +++ b/R/yaml_write.R @@ -687,8 +687,8 @@ yaml_agent_string <- function( } -as_vars_fn <- function(columns) { - paste0("vars(", columns, ")") +as_c_fn <- function(columns) { + paste0("c(", columns, ")") } as_list_preconditions <- function(preconditions) { @@ -1330,7 +1330,7 @@ as_agent_yaml_list <- function(agent, expanded) { if (is.na(step_list$column[[1]][[1]])) { vars_cols <- NULL } else { - vars_cols <- as_vars_fn(step_list$column[[1]]) + vars_cols <- as_c_fn(step_list$column[[1]]) } lst_step <- @@ -1555,7 +1555,7 @@ get_column_text <- function(step_list, expanded) { if (!is.na(step_list$column[[1]]) && step_list$column[[1]] == step_list$columns_expr) { - column_text <- as_vars_fn(step_list$column[[1]]) + column_text <- as_c_fn(step_list$column[[1]]) } else { column_text <- step_list$columns_expr @@ -1563,7 +1563,7 @@ get_column_text <- function(step_list, expanded) { } else { - column_text <- as_vars_fn(columns = step_list$column[[1]]) + column_text <- as_c_fn(columns = step_list$column[[1]]) } column_text From 644c948bab28aa3235c245086b4d0f368fbc3b6e Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 20:17:04 -0400 Subject: [PATCH 16/46] read c()-expr from yaml as language not character --- R/yaml_read_agent.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/yaml_read_agent.R b/R/yaml_read_agent.R index f874b5b3f..758a34636 100644 --- a/R/yaml_read_agent.R +++ b/R/yaml_read_agent.R @@ -539,7 +539,7 @@ make_validation_steps <- function(steps) { tidyselect_regex <- paste0( "^(", - paste(c("vars", exported_tidyselect_fns()), collapse = "|"), + paste(c("vars", "c", exported_tidyselect_fns()), collapse = "|"), ")\\(.*?\\)$" ) From 751d06a577fa0ba70beb21e2485e7cf7b87eb839 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 20:17:47 -0400 Subject: [PATCH 17/46] change some yaml tests to expect writing to c() --- tests/testthat/test-yaml.R | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test-yaml.R b/tests/testthat/test-yaml.R index 02279b826..9fa9d57a7 100644 --- a/tests/testthat/test-yaml.R +++ b/tests/testthat/test-yaml.R @@ -800,19 +800,19 @@ test_that("Individual validation steps make the YAML round-trip successfully", { expect_equal( get_oneline_expr_str(agent %>% rows_distinct()), - "rows_distinct(columns = vars(date_time, date, a, b, c, d, e, f))" + "rows_distinct(columns = c(date_time, date, a, b, c, d, e, f))" ) expect_equal( get_oneline_expr_str(agent %>% rows_distinct(columns = vars(a, b))), - "rows_distinct(columns = vars(a, b))" + "rows_distinct(columns = c(a, b))" ) expect_equal( get_oneline_expr_str(agent %>% rows_distinct(columns = vars(a, b), preconditions = ~ . %>% dplyr::filter(a > 0))), - "rows_distinct(columns = vars(a, b),preconditions = ~. %>% dplyr::filter(a > 0))" + "rows_distinct(columns = c(a, b),preconditions = ~. %>% dplyr::filter(a > 0))" ) expect_equal( get_oneline_expr_str(agent %>% rows_distinct(columns = vars(a, b), label = "my_label")), - "rows_distinct(columns = vars(a, b),label = \"my_label\")" + "rows_distinct(columns = c(a, b),label = \"my_label\")" ) # @@ -888,3 +888,4 @@ test_that("Individual validation steps make the YAML round-trip successfully", { "col_schema_match(schema = col_schema(a = \"integer\",b = \"character\"),label = \"my_label\")" ) }) + From 44d510ec3892b62c92814116b86231be7b74b8da Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 20:29:13 -0400 Subject: [PATCH 18/46] test columns c()-expr roundtrip --- tests/testthat/test-tidyselect_integration.R | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/testthat/test-tidyselect_integration.R b/tests/testthat/test-tidyselect_integration.R index 081e11932..81269f8af 100644 --- a/tests/testthat/test-tidyselect_integration.R +++ b/tests/testthat/test-tidyselect_integration.R @@ -241,3 +241,30 @@ test_that("c()-expr works for serially", { ) }) + +test_that("explicit c()-expr make the yaml roundtrip", { + + agent_pre <- create_agent(~ small_table) %>% + col_vals_lt( + columns = c(a, c), + value = 8 + ) + + agent_yaml <- tempfile() + yaml_write(agent_pre, expanded = FALSE, filename = agent_yaml) + # Writes to c()-expr + expect_true(any(grepl("columns: c(a, c)", readLines(agent_yaml), fixed = TRUE))) + + agent_post <- yaml_read_agent(agent_yaml) + # yaml_agent_string(agent_post, expanded = FALSE) + + expect_identical( + as_agent_yaml_list(agent_pre, expanded = FALSE), + as_agent_yaml_list(agent_post, expanded = FALSE) + ) + expect_identical( + agent_pre %>% interrogate() %>% get_agent_report(display_table = FALSE), + agent_post %>% interrogate() %>% get_agent_report(display_table = FALSE) + ) + +}) From f42385aa5dfe9f11ae26ab0cbe5d662c1f9f01a2 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 20:33:22 -0400 Subject: [PATCH 19/46] test defaulting to c() for wrapping columns in yaml --- tests/testthat/test-tidyselect_integration.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/testthat/test-tidyselect_integration.R b/tests/testthat/test-tidyselect_integration.R index 81269f8af..ae53bbe20 100644 --- a/tests/testthat/test-tidyselect_integration.R +++ b/tests/testthat/test-tidyselect_integration.R @@ -267,4 +267,10 @@ test_that("explicit c()-expr make the yaml roundtrip", { agent_post %>% interrogate() %>% get_agent_report(display_table = FALSE) ) + # Defaults writing to c()-expr + testthat::expect_message( + create_agent(~ small_table) %>% col_exists(a) %>% yaml_agent_string(), + "columns: c\\(a\\)" + ) + }) From 895eee9c4636e9529e2d3c64845660859f394c98 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 20:40:53 -0400 Subject: [PATCH 20/46] remove vars() from yaml section in docs --- R/col_exists.R | 2 +- R/col_is_character.R | 2 +- R/col_is_date.R | 2 +- R/col_is_factor.R | 2 +- R/col_is_integer.R | 2 +- R/col_is_logical.R | 2 +- R/col_is_numeric.R | 2 +- R/col_is_posix.R | 2 +- R/col_vals_between.R | 2 +- R/col_vals_decreasing.R | 2 +- R/col_vals_equal.R | 2 +- R/col_vals_gt.R | 2 +- R/col_vals_gte.R | 2 +- R/col_vals_in_set.R | 2 +- R/col_vals_increasing.R | 2 +- R/col_vals_lt.R | 2 +- R/col_vals_lte.R | 2 +- R/col_vals_make_set.R | 2 +- R/col_vals_make_subset.R | 2 +- R/col_vals_not_between.R | 2 +- R/col_vals_not_equal.R | 2 +- R/col_vals_not_in_set.R | 2 +- R/col_vals_not_null.R | 2 +- R/col_vals_null.R | 2 +- R/col_vals_regex.R | 2 +- R/col_vals_within_spec.R | 2 +- R/emailing.R | 8 ++++---- R/rows_complete.R | 4 ++-- R/rows_distinct.R | 2 +- R/tbl_store.R | 4 ++-- R/yaml_write.R | 6 +++--- 31 files changed, 38 insertions(+), 38 deletions(-) diff --git a/R/col_exists.R b/R/col_exists.R index 8b577df52..7e51a101a 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -125,7 +125,7 @@ #' ```yaml #' steps: #' - col_exists: -#' columns: vars(a) +#' columns: c(a) #' actions: #' warn_fraction: 0.1 #' stop_fraction: 0.2 diff --git a/R/col_is_character.R b/R/col_is_character.R index 23f9b7827..9cf85d662 100644 --- a/R/col_is_character.R +++ b/R/col_is_character.R @@ -120,7 +120,7 @@ #' ```yaml #' steps: #' - col_is_character: -#' columns: vars(a) +#' columns: c(a) #' actions: #' warn_fraction: 0.1 #' stop_fraction: 0.2 diff --git a/R/col_is_date.R b/R/col_is_date.R index c49dfb475..9f878508c 100644 --- a/R/col_is_date.R +++ b/R/col_is_date.R @@ -120,7 +120,7 @@ #' ```yaml #' steps: #' - col_is_date: -#' columns: vars(a) +#' columns: c(a) #' actions: #' warn_fraction: 0.1 #' stop_fraction: 0.2 diff --git a/R/col_is_factor.R b/R/col_is_factor.R index 8356e098a..cae2ade99 100644 --- a/R/col_is_factor.R +++ b/R/col_is_factor.R @@ -120,7 +120,7 @@ #' ```yaml #' steps: #' - col_is_factor: -#' columns: vars(a) +#' columns: c(a) #' actions: #' warn_fraction: 0.1 #' stop_fraction: 0.2 diff --git a/R/col_is_integer.R b/R/col_is_integer.R index 478f5908b..01beb84a5 100644 --- a/R/col_is_integer.R +++ b/R/col_is_integer.R @@ -120,7 +120,7 @@ #' ```yaml #' steps: #' - col_is_integer: -#' columns: vars(a) +#' columns: c(a) #' actions: #' warn_fraction: 0.1 #' stop_fraction: 0.2 diff --git a/R/col_is_logical.R b/R/col_is_logical.R index 40f757f03..557d042cd 100644 --- a/R/col_is_logical.R +++ b/R/col_is_logical.R @@ -120,7 +120,7 @@ #' ```yaml #' steps: #' - col_is_logical: -#' columns: vars(a) +#' columns: c(a) #' actions: #' warn_fraction: 0.1 #' stop_fraction: 0.2 diff --git a/R/col_is_numeric.R b/R/col_is_numeric.R index ade0fb911..5267c42ae 100644 --- a/R/col_is_numeric.R +++ b/R/col_is_numeric.R @@ -120,7 +120,7 @@ #' ```yaml #' steps: #' - col_is_numeric: -#' columns: vars(a) +#' columns: c(a) #' actions: #' warn_fraction: 0.1 #' stop_fraction: 0.2 diff --git a/R/col_is_posix.R b/R/col_is_posix.R index 9d5ce427b..0b68ea347 100644 --- a/R/col_is_posix.R +++ b/R/col_is_posix.R @@ -120,7 +120,7 @@ #' ```yaml #' steps: #' - col_is_posix: -#' columns: vars(a) +#' columns: c(a) #' actions: #' warn_fraction: 0.1 #' stop_fraction: 0.2 diff --git a/R/col_vals_between.R b/R/col_vals_between.R index 962dd8db2..912dd5d0a 100644 --- a/R/col_vals_between.R +++ b/R/col_vals_between.R @@ -217,7 +217,7 @@ #' ```yaml #' steps: #' - col_vals_between: -#' columns: vars(a) +#' columns: c(a) #' left: 1.0 #' right: 2.0 #' inclusive: diff --git a/R/col_vals_decreasing.R b/R/col_vals_decreasing.R index c498dc1da..212574e66 100644 --- a/R/col_vals_decreasing.R +++ b/R/col_vals_decreasing.R @@ -206,7 +206,7 @@ #' ```yaml #' steps: #' - col_vals_decreasing: -#' columns: vars(a) +#' columns: c(a) #' allow_stationary: true #' increasing_tol: 0.5 #' na_pass: true diff --git a/R/col_vals_equal.R b/R/col_vals_equal.R index 33bfa8c8e..4ee3ce288 100644 --- a/R/col_vals_equal.R +++ b/R/col_vals_equal.R @@ -191,7 +191,7 @@ #' ```yaml #' steps: #' - col_vals_equal: -#' columns: vars(a) +#' columns: c(a) #' value: 1.0 #' na_pass: true #' preconditions: ~. %>% dplyr::filter(a < 10) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index 031d6f0d0..442eb1ad8 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -313,7 +313,7 @@ #' ```yaml #' steps: #' - col_vals_gt: -#' columns: vars(a) +#' columns: c(a) #' value: 1.0 #' na_pass: true #' preconditions: ~. %>% dplyr::filter(a < 10) diff --git a/R/col_vals_gte.R b/R/col_vals_gte.R index 5030c89eb..74e37abf0 100644 --- a/R/col_vals_gte.R +++ b/R/col_vals_gte.R @@ -192,7 +192,7 @@ #' ```yaml #' steps: #' - col_vals_gte: -#' columns: vars(a) +#' columns: c(a) #' value: 1.0 #' na_pass: true #' preconditions: ~. %>% dplyr::filter(a < 10) diff --git a/R/col_vals_in_set.R b/R/col_vals_in_set.R index 70fbda20a..2b7e93077 100644 --- a/R/col_vals_in_set.R +++ b/R/col_vals_in_set.R @@ -181,7 +181,7 @@ #' ```yaml #' steps: #' - col_vals_in_set: -#' columns: vars(a) +#' columns: c(a) #' set: #' - 1.0 #' - 2.0 diff --git a/R/col_vals_increasing.R b/R/col_vals_increasing.R index 8c6501d8a..8f086b3ee 100644 --- a/R/col_vals_increasing.R +++ b/R/col_vals_increasing.R @@ -206,7 +206,7 @@ #' ```yaml #' steps: #' - col_vals_increasing: -#' columns: vars(a) +#' columns: c(a) #' allow_stationary: true #' decreasing_tol: 0.5 #' na_pass: true diff --git a/R/col_vals_lt.R b/R/col_vals_lt.R index 554d00f42..3e00356e1 100644 --- a/R/col_vals_lt.R +++ b/R/col_vals_lt.R @@ -192,7 +192,7 @@ #' ```yaml #' steps: #' - col_vals_lt: -#' columns: vars(a) +#' columns: c(a) #' value: 1.0 #' na_pass: true #' preconditions: ~. %>% dplyr::filter(a < 10) diff --git a/R/col_vals_lte.R b/R/col_vals_lte.R index 18eab3b3e..f677610c3 100644 --- a/R/col_vals_lte.R +++ b/R/col_vals_lte.R @@ -193,7 +193,7 @@ #' ```yaml #' steps: #' - col_vals_lte: -#' columns: vars(a) +#' columns: c(a) #' value: 1.0 #' na_pass: true #' preconditions: ~. %>% dplyr::filter(a < 10) diff --git a/R/col_vals_make_set.R b/R/col_vals_make_set.R index 716fe9dbb..ffddb1d7a 100644 --- a/R/col_vals_make_set.R +++ b/R/col_vals_make_set.R @@ -185,7 +185,7 @@ #' ```yaml #' steps: #' - col_vals_make_set: -#' columns: vars(a) +#' columns: c(a) #' set: #' - 1.0 #' - 2.0 diff --git a/R/col_vals_make_subset.R b/R/col_vals_make_subset.R index 1772db9ee..2a09a3bd6 100644 --- a/R/col_vals_make_subset.R +++ b/R/col_vals_make_subset.R @@ -181,7 +181,7 @@ #' ```yaml #' steps: #' - col_vals_make_subset: -#' columns: vars(a) +#' columns: c(a) #' set: #' - 1.0 #' - 2.0 diff --git a/R/col_vals_not_between.R b/R/col_vals_not_between.R index 804ba3349..717fab982 100644 --- a/R/col_vals_not_between.R +++ b/R/col_vals_not_between.R @@ -218,7 +218,7 @@ #' ```yaml #' steps: #' - col_vals_not_between: -#' columns: vars(a) +#' columns: c(a) #' left: 1.0 #' right: 2.0 #' inclusive: diff --git a/R/col_vals_not_equal.R b/R/col_vals_not_equal.R index 369763aa4..cb1ea016e 100644 --- a/R/col_vals_not_equal.R +++ b/R/col_vals_not_equal.R @@ -190,7 +190,7 @@ #' ```yaml #' steps: #' - col_vals_not_equal: -#' columns: vars(a) +#' columns: c(a) #' value: 1.0 #' na_pass: true #' preconditions: ~. %>% dplyr::filter(a < 10) diff --git a/R/col_vals_not_in_set.R b/R/col_vals_not_in_set.R index 98b772197..c0e481049 100644 --- a/R/col_vals_not_in_set.R +++ b/R/col_vals_not_in_set.R @@ -181,7 +181,7 @@ #' ```yaml #' steps: #' - col_vals_not_in_set: -#' columns: vars(a) +#' columns: c(a) #' set: #' - 1.0 #' - 2.0 diff --git a/R/col_vals_not_null.R b/R/col_vals_not_null.R index 0a655959d..3b941cd5a 100644 --- a/R/col_vals_not_null.R +++ b/R/col_vals_not_null.R @@ -174,7 +174,7 @@ #' ```yaml #' steps: #' - col_vals_not_null: -#' columns: vars(a) +#' columns: c(a) #' preconditions: ~. %>% dplyr::filter(a < 10) #' segments: b ~ c("group_1", "group_2") #' actions: diff --git a/R/col_vals_null.R b/R/col_vals_null.R index 9d64b20d1..81bfeaafb 100644 --- a/R/col_vals_null.R +++ b/R/col_vals_null.R @@ -173,7 +173,7 @@ #' ```yaml #' steps: #' - col_vals_null: -#' columns: vars(a) +#' columns: c(a) #' preconditions: ~. %>% dplyr::filter(a < 10) #' segments: b ~ c("group_1", "group_2") #' actions: diff --git a/R/col_vals_regex.R b/R/col_vals_regex.R index bd839f4bb..627f73d9d 100644 --- a/R/col_vals_regex.R +++ b/R/col_vals_regex.R @@ -189,7 +189,7 @@ #' ```yaml #' steps: #' - col_vals_regex: -#' columns: vars(a) +#' columns: c(a) #' regex: '[0-9]-[a-z]{3}-[0-9]{3}' #' na_pass: true #' preconditions: ~. %>% dplyr::filter(a < 10) diff --git a/R/col_vals_within_spec.R b/R/col_vals_within_spec.R index e915e81e4..2e4d32887 100644 --- a/R/col_vals_within_spec.R +++ b/R/col_vals_within_spec.R @@ -239,7 +239,7 @@ #' ```yaml #' steps: #' - col_vals_within_spec: -#' columns: vars(a) +#' columns: c(a) #' spec: email #' na_pass: true #' preconditions: ~. %>% dplyr::filter(b < 10) diff --git a/R/emailing.R b/R/emailing.R index 0f9399a0e..44a7cf880 100644 --- a/R/emailing.R +++ b/R/emailing.R @@ -93,8 +93,8 @@ #' ) #' ) #' ) %>% -#' col_vals_gt(vars(a), 1) %>% -#' col_vals_lt(vars(a), 7) +#' col_vals_gt(a, 1) %>% +#' col_vals_lt(a, 7) #' ``` #' #' YAML representation: @@ -116,10 +116,10 @@ #' embed_report: true #' steps: #' - col_vals_gt: -#' columns: vars(a) +#' columns: c(a) #' value: 1.0 #' - col_vals_lt: -#' columns: vars(a) +#' columns: c(a) #' value: 7.0 #' ``` #' diff --git a/R/rows_complete.R b/R/rows_complete.R index b05cf14e6..408217180 100644 --- a/R/rows_complete.R +++ b/R/rows_complete.R @@ -150,7 +150,7 @@ #' ```r #' agent %>% #' rows_complete( -#' columns = a, b, +#' columns = c(a, b), #' preconditions = ~ . %>% dplyr::filter(a < 10), #' segments = b ~ c("group_1", "group_2"), #' actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -164,7 +164,7 @@ #' ```yaml #' steps: #' - rows_complete: -#' columns: vars(a, b) +#' columns: c(a, b) #' preconditions: ~. %>% dplyr::filter(a < 10) #' segments: b ~ c("group_1", "group_2") #' actions: diff --git a/R/rows_distinct.R b/R/rows_distinct.R index 158a156d5..52ce850f3 100644 --- a/R/rows_distinct.R +++ b/R/rows_distinct.R @@ -165,7 +165,7 @@ #' ``` #' steps: #' - rows_distinct: -#' columns: vars(a, b) +#' columns: c(a, b) #' preconditions: ~. %>% dplyr::filter(a < 10) #' segments: b ~ c("group_1", "group_2") #' actions: diff --git a/R/tbl_store.R b/R/tbl_store.R index d59f850af..3adbfcbe9 100644 --- a/R/tbl_store.R +++ b/R/tbl_store.R @@ -107,7 +107,7 @@ #' label = "An example that uses a table store.", #' actions = action_levels(warn_at = 0.10) #' ) %>% -#' col_exists(vars(date, date_time)) %>% +#' col_exists(c(date, date_time)) %>% #' write_yaml() #' ``` #' @@ -122,7 +122,7 @@ #' locale: en #' steps: #' - col_exists: -#' columns: vars(date, date_time) +#' columns: c(date, date_time) #' ``` #' #' Now, whenever the `sml_table_high` table needs to be validated, it can be diff --git a/R/yaml_write.R b/R/yaml_write.R index ff66322a1..e0a373eba 100644 --- a/R/yaml_write.R +++ b/R/yaml_write.R @@ -178,17 +178,17 @@ #' notify_fraction: 0.35 #' steps: #' - col_exists: -#' columns: vars(date, date_time) +#' columns: c(date, date_time) #' - col_vals_regex: #' columns: vars(b) #' regex: '[0-9]-[a-z]{3}-[0-9]{3}' #' - rows_distinct: #' columns: ~ #' - col_vals_gt: -#' columns: vars(d) +#' columns: c(d) #' value: 100.0 #' - col_vals_lte: -#' columns: vars(c) +#' columns: c(c) #' value: 5.0 #' ``` #' From a0d696d5a4b0c39dadeaf8ad863c51b727aa461e Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 20:48:00 -0400 Subject: [PATCH 21/46] more cleanup of vars() in docs --- R/emailing.R | 8 ++++---- R/get_data_extracts.R | 2 +- R/has_columns.R | 6 +++--- R/object_ops.R | 2 +- R/tbl_from_file.R | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/R/emailing.R b/R/emailing.R index 44a7cf880..3c53777b3 100644 --- a/R/emailing.R +++ b/R/emailing.R @@ -176,8 +176,8 @@ #' ) #' ) #' ) %>% -#' col_vals_gt(vars(a), value = 1) %>% -#' col_vals_lt(vars(a), value = 7) %>% +#' col_vals_gt(a, value = 1) %>% +#' col_vals_lt(a, value = 7) %>% #' interrogate() #' ``` #' @@ -294,8 +294,8 @@ email_blast <- function( #' label = "An example.", #' actions = al #' ) %>% -#' col_vals_gt(vars(a), value = 1) %>% -#' col_vals_lt(vars(a), value = 7) %>% +#' col_vals_gt(a, value = 1) %>% +#' col_vals_lt(a, value = 7) %>% #' interrogate() %>% #' email_create() #' diff --git a/R/get_data_extracts.R b/R/get_data_extracts.R index 8f5239c12..f725514b2 100644 --- a/R/get_data_extracts.R +++ b/R/get_data_extracts.R @@ -77,7 +77,7 @@ #' dplyr::select(a:f), #' label = "`get_data_extracts()`" #' ) %>% -#' col_vals_gt(vars(d), value = 1000) %>% +#' col_vals_gt(d, value = 1000) %>% #' col_vals_between( #' columns = c, #' left = vars(a), right = vars(d), diff --git a/R/has_columns.R b/R/has_columns.R index e4dafa1ee..9c2b86006 100644 --- a/R/has_columns.R +++ b/R/has_columns.R @@ -119,16 +119,16 @@ #' tbl_name = "small_table" #' ) %>% #' col_vals_gt( -#' columns = vars(c), value = vars(a), +#' columns = c, value = vars(a), #' active = ~ . %>% has_columns(vars(a, c)) #' ) %>% #' col_vals_lt( -#' columns = vars(h), value = vars(d), +#' columns = h, value = vars(d), #' preconditions = ~ . %>% dplyr::mutate(h = d - a), #' active = ~ . %>% has_columns(vars(a, d)) #' ) %>% #' col_is_character( -#' columns = vars(j), +#' columns = j, #' active = ~ . %>% has_columns("j") #' ) %>% #' interrogate() diff --git a/R/object_ops.R b/R/object_ops.R index 58c16fc36..cfe306c17 100644 --- a/R/object_ops.R +++ b/R/object_ops.R @@ -241,7 +241,7 @@ #' ) %>% #' col_vals_gt( #' columns = b, -#' value = vars(g), +#' value = g, #' na_pass = TRUE, #' label = "b > g" #' ) %>% diff --git a/R/tbl_from_file.R b/R/tbl_from_file.R index b32b11abb..20d6d3665 100644 --- a/R/tbl_from_file.R +++ b/R/tbl_from_file.R @@ -463,7 +463,7 @@ file_tbl <- function( #' # col_types = "TDdcddlc" #' # ) #' # ) %>% -#' # col_vals_gt(vars(a), 0) %>% +#' # col_vals_gt(a, 0) %>% #' # interrogate() #' #' # The `from_github()` helper function is From 98d2718800a9069ff42b5406fe68777ac2ccc2a5 Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 21:00:20 -0400 Subject: [PATCH 22/46] document() --- man/col_exists.Rd | 2 +- man/col_is_character.Rd | 2 +- man/col_is_date.Rd | 2 +- man/col_is_factor.Rd | 2 +- man/col_is_integer.Rd | 2 +- man/col_is_logical.Rd | 2 +- man/col_is_numeric.Rd | 2 +- man/col_is_posix.Rd | 2 +- man/col_vals_between.Rd | 2 +- man/col_vals_decreasing.Rd | 2 +- man/col_vals_equal.Rd | 2 +- man/col_vals_gt.Rd | 2 +- man/col_vals_gte.Rd | 2 +- man/col_vals_in_set.Rd | 2 +- man/col_vals_increasing.Rd | 2 +- man/col_vals_lt.Rd | 2 +- man/col_vals_lte.Rd | 2 +- man/col_vals_make_set.Rd | 2 +- man/col_vals_make_subset.Rd | 2 +- man/col_vals_not_between.Rd | 2 +- man/col_vals_not_equal.Rd | 2 +- man/col_vals_not_in_set.Rd | 2 +- man/col_vals_not_null.Rd | 2 +- man/col_vals_null.Rd | 2 +- man/col_vals_regex.Rd | 2 +- man/col_vals_within_spec.Rd | 2 +- man/email_blast.Rd | 12 ++++++------ man/email_create.Rd | 4 ++-- man/from_github.Rd | 2 +- man/get_data_extracts.Rd | 2 +- man/has_columns.Rd | 6 +++--- man/rows_complete.Rd | 4 ++-- man/rows_distinct.Rd | 2 +- man/serially.Rd | 10 +++++----- man/tbl_store.Rd | 4 ++-- man/x_write_disk.Rd | 2 +- man/yaml_write.Rd | 6 +++--- 37 files changed, 53 insertions(+), 53 deletions(-) diff --git a/man/col_exists.Rd b/man/col_exists.Rd index eba6fb251..05fe38284 100644 --- a/man/col_exists.Rd +++ b/man/col_exists.Rd @@ -221,7 +221,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_exists: - columns: vars(a) + columns: c(a) actions: warn_fraction: 0.1 stop_fraction: 0.2 diff --git a/man/col_is_character.Rd b/man/col_is_character.Rd index 54ef847ec..cc491e2b0 100644 --- a/man/col_is_character.Rd +++ b/man/col_is_character.Rd @@ -222,7 +222,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_is_character: - columns: vars(a) + columns: c(a) actions: warn_fraction: 0.1 stop_fraction: 0.2 diff --git a/man/col_is_date.Rd b/man/col_is_date.Rd index 9ad8030a8..2a028e88d 100644 --- a/man/col_is_date.Rd +++ b/man/col_is_date.Rd @@ -222,7 +222,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_is_date: - columns: vars(a) + columns: c(a) actions: warn_fraction: 0.1 stop_fraction: 0.2 diff --git a/man/col_is_factor.Rd b/man/col_is_factor.Rd index 7e5256bfe..91dc636e7 100644 --- a/man/col_is_factor.Rd +++ b/man/col_is_factor.Rd @@ -222,7 +222,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_is_factor: - columns: vars(a) + columns: c(a) actions: warn_fraction: 0.1 stop_fraction: 0.2 diff --git a/man/col_is_integer.Rd b/man/col_is_integer.Rd index bbf11116e..494e1953f 100644 --- a/man/col_is_integer.Rd +++ b/man/col_is_integer.Rd @@ -222,7 +222,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_is_integer: - columns: vars(a) + columns: c(a) actions: warn_fraction: 0.1 stop_fraction: 0.2 diff --git a/man/col_is_logical.Rd b/man/col_is_logical.Rd index eefd5acb1..3cd1f2fa0 100644 --- a/man/col_is_logical.Rd +++ b/man/col_is_logical.Rd @@ -222,7 +222,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_is_logical: - columns: vars(a) + columns: c(a) actions: warn_fraction: 0.1 stop_fraction: 0.2 diff --git a/man/col_is_numeric.Rd b/man/col_is_numeric.Rd index 1ccd357e5..e23adff0c 100644 --- a/man/col_is_numeric.Rd +++ b/man/col_is_numeric.Rd @@ -222,7 +222,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_is_numeric: - columns: vars(a) + columns: c(a) actions: warn_fraction: 0.1 stop_fraction: 0.2 diff --git a/man/col_is_posix.Rd b/man/col_is_posix.Rd index 1107f3c7d..24c6695af 100644 --- a/man/col_is_posix.Rd +++ b/man/col_is_posix.Rd @@ -222,7 +222,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_is_posix: - columns: vars(a) + columns: c(a) actions: warn_fraction: 0.1 stop_fraction: 0.2 diff --git a/man/col_vals_between.Rd b/man/col_vals_between.Rd index 4bb2e4424..7ea4186f9 100644 --- a/man/col_vals_between.Rd +++ b/man/col_vals_between.Rd @@ -375,7 +375,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_between: - columns: vars(a) + columns: c(a) left: 1.0 right: 2.0 inclusive: diff --git a/man/col_vals_decreasing.Rd b/man/col_vals_decreasing.Rd index 59b5f0327..ffc5ca51f 100644 --- a/man/col_vals_decreasing.Rd +++ b/man/col_vals_decreasing.Rd @@ -361,7 +361,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_decreasing: - columns: vars(a) + columns: c(a) allow_stationary: true increasing_tol: 0.5 na_pass: true diff --git a/man/col_vals_equal.Rd b/man/col_vals_equal.Rd index 601602a70..07be17cb4 100644 --- a/man/col_vals_equal.Rd +++ b/man/col_vals_equal.Rd @@ -343,7 +343,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_equal: - columns: vars(a) + columns: c(a) value: 1.0 na_pass: true preconditions: ~. \%>\% dplyr::filter(a < 10) diff --git a/man/col_vals_gt.Rd b/man/col_vals_gt.Rd index d945bd960..bdd25d74f 100644 --- a/man/col_vals_gt.Rd +++ b/man/col_vals_gt.Rd @@ -344,7 +344,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_gt: - columns: vars(a) + columns: c(a) value: 1.0 na_pass: true preconditions: ~. \%>\% dplyr::filter(a < 10) diff --git a/man/col_vals_gte.Rd b/man/col_vals_gte.Rd index e1976a246..1419e772b 100644 --- a/man/col_vals_gte.Rd +++ b/man/col_vals_gte.Rd @@ -343,7 +343,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_gte: - columns: vars(a) + columns: c(a) value: 1.0 na_pass: true preconditions: ~. \%>\% dplyr::filter(a < 10) diff --git a/man/col_vals_in_set.Rd b/man/col_vals_in_set.Rd index 6bd3912bc..8a79ac111 100644 --- a/man/col_vals_in_set.Rd +++ b/man/col_vals_in_set.Rd @@ -316,7 +316,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_in_set: - columns: vars(a) + columns: c(a) set: - 1.0 - 2.0 diff --git a/man/col_vals_increasing.Rd b/man/col_vals_increasing.Rd index 78e0ded58..cbe12bcbe 100644 --- a/man/col_vals_increasing.Rd +++ b/man/col_vals_increasing.Rd @@ -361,7 +361,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_increasing: - columns: vars(a) + columns: c(a) allow_stationary: true decreasing_tol: 0.5 na_pass: true diff --git a/man/col_vals_lt.Rd b/man/col_vals_lt.Rd index 374bc4791..7507eadf3 100644 --- a/man/col_vals_lt.Rd +++ b/man/col_vals_lt.Rd @@ -344,7 +344,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_lt: - columns: vars(a) + columns: c(a) value: 1.0 na_pass: true preconditions: ~. \%>\% dplyr::filter(a < 10) diff --git a/man/col_vals_lte.Rd b/man/col_vals_lte.Rd index ca4718c3a..e39425e66 100644 --- a/man/col_vals_lte.Rd +++ b/man/col_vals_lte.Rd @@ -345,7 +345,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_lte: - columns: vars(a) + columns: c(a) value: 1.0 na_pass: true preconditions: ~. \%>\% dplyr::filter(a < 10) diff --git a/man/col_vals_make_set.Rd b/man/col_vals_make_set.Rd index 07d4f3e1f..eae0fbf0f 100644 --- a/man/col_vals_make_set.Rd +++ b/man/col_vals_make_set.Rd @@ -326,7 +326,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_make_set: - columns: vars(a) + columns: c(a) set: - 1.0 - 2.0 diff --git a/man/col_vals_make_subset.Rd b/man/col_vals_make_subset.Rd index bbb4da23d..a10273d50 100644 --- a/man/col_vals_make_subset.Rd +++ b/man/col_vals_make_subset.Rd @@ -322,7 +322,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_make_subset: - columns: vars(a) + columns: c(a) set: - 1.0 - 2.0 diff --git a/man/col_vals_not_between.Rd b/man/col_vals_not_between.Rd index c290da175..5ee5086f4 100644 --- a/man/col_vals_not_between.Rd +++ b/man/col_vals_not_between.Rd @@ -375,7 +375,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_not_between: - columns: vars(a) + columns: c(a) left: 1.0 right: 2.0 inclusive: diff --git a/man/col_vals_not_equal.Rd b/man/col_vals_not_equal.Rd index 61aa4e63e..1d3fee130 100644 --- a/man/col_vals_not_equal.Rd +++ b/man/col_vals_not_equal.Rd @@ -342,7 +342,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_not_equal: - columns: vars(a) + columns: c(a) value: 1.0 na_pass: true preconditions: ~. \%>\% dplyr::filter(a < 10) diff --git a/man/col_vals_not_in_set.Rd b/man/col_vals_not_in_set.Rd index 97082563e..5e352f4cb 100644 --- a/man/col_vals_not_in_set.Rd +++ b/man/col_vals_not_in_set.Rd @@ -322,7 +322,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_not_in_set: - columns: vars(a) + columns: c(a) set: - 1.0 - 2.0 diff --git a/man/col_vals_not_null.Rd b/man/col_vals_not_null.Rd index 11a8ac8e3..918c7eaf9 100644 --- a/man/col_vals_not_null.Rd +++ b/man/col_vals_not_null.Rd @@ -302,7 +302,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_not_null: - columns: vars(a) + columns: c(a) preconditions: ~. \%>\% dplyr::filter(a < 10) segments: b ~ c("group_1", "group_2") actions: diff --git a/man/col_vals_null.Rd b/man/col_vals_null.Rd index cfbaf4a06..0747a195f 100644 --- a/man/col_vals_null.Rd +++ b/man/col_vals_null.Rd @@ -301,7 +301,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_null: - columns: vars(a) + columns: c(a) preconditions: ~. \%>\% dplyr::filter(a < 10) segments: b ~ c("group_1", "group_2") actions: diff --git a/man/col_vals_regex.Rd b/man/col_vals_regex.Rd index bdc89bd37..5e487dd28 100644 --- a/man/col_vals_regex.Rd +++ b/man/col_vals_regex.Rd @@ -341,7 +341,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_regex: - columns: vars(a) + columns: c(a) regex: '[0-9]-[a-z]\{3\}-[0-9]\{3\}' na_pass: true preconditions: ~. \%>\% dplyr::filter(a < 10) diff --git a/man/col_vals_within_spec.Rd b/man/col_vals_within_spec.Rd index 1f426abd5..619e84282 100644 --- a/man/col_vals_within_spec.Rd +++ b/man/col_vals_within_spec.Rd @@ -394,7 +394,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - col_vals_within_spec: - columns: vars(a) + columns: c(a) spec: email na_pass: true preconditions: ~. \%>\% dplyr::filter(b < 10) diff --git a/man/email_blast.Rd b/man/email_blast.Rd index 1453160ed..ff75155ed 100644 --- a/man/email_blast.Rd +++ b/man/email_blast.Rd @@ -88,8 +88,8 @@ R statement: ) ) ) \%>\% - col_vals_gt(vars(a), 1) \%>\% - col_vals_lt(vars(a), 7) + col_vals_gt(a, 1) \%>\% + col_vals_lt(a, 7) }\if{html}{\out{
}} YAML representation: @@ -110,10 +110,10 @@ end_fns: ~email_blast(x, to = "joe_public@example.com", embed_report: true steps: - col_vals_gt: - columns: vars(a) + columns: c(a) value: 1.0 - col_vals_lt: - columns: vars(a) + columns: c(a) value: 7.0 }\if{html}{\out{
}} } @@ -170,8 +170,8 @@ interrogation of data in \code{small_table}: ) ) ) \%>\% - col_vals_gt(vars(a), value = 1) \%>\% - col_vals_lt(vars(a), value = 7) \%>\% + col_vals_gt(a, value = 1) \%>\% + col_vals_lt(a, value = 7) \%>\% interrogate() }\if{html}{\out{
}} diff --git a/man/email_create.Rd b/man/email_create.Rd index 8d5e6d65b..238148346 100644 --- a/man/email_create.Rd +++ b/man/email_create.Rd @@ -62,8 +62,8 @@ email just by printing \code{email_object}. It should appear in the Viewer. label = "An example.", actions = al ) \%>\% - col_vals_gt(vars(a), value = 1) \%>\% - col_vals_lt(vars(a), value = 7) \%>\% + col_vals_gt(a, value = 1) \%>\% + col_vals_lt(a, value = 7) \%>\% interrogate() \%>\% email_create() diff --git a/man/from_github.Rd b/man/from_github.Rd index ae2079b4d..d1fb9a61d 100644 --- a/man/from_github.Rd +++ b/man/from_github.Rd @@ -65,7 +65,7 @@ where GitHub URLs for raw user content are needed. # col_types = "TDdcddlc" # ) # ) \%>\% -# col_vals_gt(vars(a), 0) \%>\% +# col_vals_gt(a, 0) \%>\% # interrogate() # The `from_github()` helper function is diff --git a/man/get_data_extracts.Rd b/man/get_data_extracts.Rd index 9dfc45f26..f86631c63 100644 --- a/man/get_data_extracts.Rd +++ b/man/get_data_extracts.Rd @@ -63,7 +63,7 @@ part of the \code{small_table} object. Use \code{\link[=interrogate]{interrogate dplyr::select(a:f), label = "`get_data_extracts()`" ) \%>\% - col_vals_gt(vars(d), value = 1000) \%>\% + col_vals_gt(d, value = 1000) \%>\% col_vals_between( columns = c, left = vars(a), right = vars(d), diff --git a/man/has_columns.Rd b/man/has_columns.Rd index a524d66c5..aaa3ab3a0 100644 --- a/man/has_columns.Rd +++ b/man/has_columns.Rd @@ -110,16 +110,16 @@ statement there we would get an evaluation failure in the agent report). tbl_name = "small_table" ) \%>\% col_vals_gt( - columns = vars(c), value = vars(a), + columns = c, value = vars(a), active = ~ . \%>\% has_columns(vars(a, c)) ) \%>\% col_vals_lt( - columns = vars(h), value = vars(d), + columns = h, value = vars(d), preconditions = ~ . \%>\% dplyr::mutate(h = d - a), active = ~ . \%>\% has_columns(vars(a, d)) ) \%>\% col_is_character( - columns = vars(j), + columns = j, active = ~ . \%>\% has_columns("j") ) \%>\% interrogate() diff --git a/man/rows_complete.Rd b/man/rows_complete.Rd index 7ba180327..d3cec58a1 100644 --- a/man/rows_complete.Rd +++ b/man/rows_complete.Rd @@ -281,7 +281,7 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% rows_complete( - columns = a, b, + columns = c(a, b), preconditions = ~ . \%>\% dplyr::filter(a < 10), segments = b ~ c("group_1", "group_2"), actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -294,7 +294,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - rows_complete: - columns: vars(a, b) + columns: c(a, b) preconditions: ~. \%>\% dplyr::filter(a < 10) segments: b ~ c("group_1", "group_2") actions: diff --git a/man/rows_distinct.Rd b/man/rows_distinct.Rd index e15b787e5..78ea71240 100644 --- a/man/rows_distinct.Rd +++ b/man/rows_distinct.Rd @@ -295,7 +295,7 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - rows_distinct: - columns: vars(a, b) + columns: c(a, b) preconditions: ~. \%>\% dplyr::filter(a < 10) segments: b ~ c("group_1", "group_2") actions: diff --git a/man/serially.Rd b/man/serially.Rd index 91f710da4..166edb091 100644 --- a/man/serially.Rd +++ b/man/serially.Rd @@ -306,8 +306,8 @@ R statement: \if{html}{\out{
}}\preformatted{agent \%>\% serially( - ~ col_vals_lt(., columns = a, value = 8), - ~ col_vals_gt(., columns = c, value = vars(a)), + ~ test_col_vals_lt(., columns = a, value = 8), + ~ test_col_vals_gt(., columns = c, value = vars(a)), ~ col_vals_not_null(., columns = b), preconditions = ~ . \%>\% dplyr::filter(a < 10), actions = action_levels(warn_at = 0.1, stop_at = 0.2), @@ -321,9 +321,9 @@ YAML representation: \if{html}{\out{
}}\preformatted{steps: - serially: fns: - - ~col_vals_lt(., columns = a, value = 8) - - ~col_vals_gt(., columns = c, value = vars(a)) - - ~col_vals_not_null(., b) + - ~test_col_vals_lt(., columns = a, value = 8) + - ~test_col_vals_gt(., columns = c, value = vars(a)) + - ~col_vals_not_null(., columns = b) preconditions: ~. \%>\% dplyr::filter(a < 10) actions: warn_fraction: 0.1 diff --git a/man/tbl_store.Rd b/man/tbl_store.Rd index 550b6eb17..1323e7f05 100644 --- a/man/tbl_store.Rd +++ b/man/tbl_store.Rd @@ -91,7 +91,7 @@ to YAML: label = "An example that uses a table store.", actions = action_levels(warn_at = 0.10) ) \%>\% - col_exists(vars(date, date_time)) \%>\% + col_exists(c(date, date_time)) \%>\% write_yaml() }\if{html}{\out{
}} @@ -105,7 +105,7 @@ actions: locale: en steps: - col_exists: - columns: vars(date, date_time) + columns: c(date, date_time) }\if{html}{\out{
}} Now, whenever the \code{sml_table_high} table needs to be validated, it can be diff --git a/man/x_write_disk.Rd b/man/x_write_disk.Rd index 565d3340a..2706c512d 100644 --- a/man/x_write_disk.Rd +++ b/man/x_write_disk.Rd @@ -227,7 +227,7 @@ validation steps, and \code{\link[=interrogate]{interrogate()}}. ) \%>\% col_vals_gt( columns = b, - value = vars(g), + value = g, na_pass = TRUE, label = "b > g" ) \%>\% diff --git a/man/yaml_write.Rd b/man/yaml_write.Rd index c28bf6066..fdba67379 100644 --- a/man/yaml_write.Rd +++ b/man/yaml_write.Rd @@ -180,17 +180,17 @@ actions: notify_fraction: 0.35 steps: - col_exists: - columns: vars(date, date_time) + columns: c(date, date_time) - col_vals_regex: columns: vars(b) regex: '[0-9]-[a-z]\{3\}-[0-9]\{3\}' - rows_distinct: columns: ~ - col_vals_gt: - columns: vars(d) + columns: c(d) value: 100.0 - col_vals_lte: - columns: vars(c) + columns: c(c) value: 5.0 }\if{html}{\out{
}} From 07c663694acfa2be10d3f3d2341297913a2ac3ff Mon Sep 17 00:00:00 2001 From: June Choe Date: Sun, 29 Oct 2023 21:15:44 -0400 Subject: [PATCH 23/46] enquo() columns only once --- R/col_exists.R | 7 ++----- R/col_is_character.R | 7 ++----- R/col_is_date.R | 7 ++----- R/col_is_factor.R | 7 ++----- R/col_is_integer.R | 7 ++----- R/col_is_logical.R | 7 ++----- R/col_is_numeric.R | 7 ++----- R/col_is_posix.R | 7 ++----- R/col_vals_between.R | 7 ++----- R/col_vals_decreasing.R | 7 ++----- R/col_vals_equal.R | 7 ++----- R/col_vals_gt.R | 7 ++----- R/col_vals_gte.R | 7 ++----- R/col_vals_in_set.R | 7 ++----- R/col_vals_increasing.R | 7 ++----- R/col_vals_lt.R | 7 ++----- R/col_vals_lte.R | 7 ++----- R/col_vals_make_set.R | 7 ++----- R/col_vals_make_subset.R | 7 ++----- R/col_vals_not_between.R | 7 ++----- R/col_vals_not_equal.R | 7 ++----- R/col_vals_not_in_set.R | 7 ++----- R/col_vals_not_null.R | 7 ++----- R/col_vals_null.R | 7 ++----- R/col_vals_regex.R | 7 ++----- R/col_vals_within_spec.R | 7 ++----- R/rows_complete.R | 9 ++++----- R/rows_distinct.R | 9 ++++----- R/utils.R | 4 ++++ 29 files changed, 64 insertions(+), 140 deletions(-) diff --git a/R/col_exists.R b/R/col_exists.R index 7e51a101a..de90be3ab 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -229,13 +229,10 @@ col_exists <- function( preconditions <- NULL values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Require columns to be specified if (rlang::quo_is_missing(columns)) { stop('argument "columns" is missing, with no default') diff --git a/R/col_is_character.R b/R/col_is_character.R index 9cf85d662..598c73884 100644 --- a/R/col_is_character.R +++ b/R/col_is_character.R @@ -226,13 +226,10 @@ col_is_character <- function( preconditions <- NULL values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) diff --git a/R/col_is_date.R b/R/col_is_date.R index 9f878508c..e30ce1d51 100644 --- a/R/col_is_date.R +++ b/R/col_is_date.R @@ -218,13 +218,10 @@ col_is_date <- function( preconditions <- NULL values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) diff --git a/R/col_is_factor.R b/R/col_is_factor.R index cae2ade99..1c107c03d 100644 --- a/R/col_is_factor.R +++ b/R/col_is_factor.R @@ -224,13 +224,10 @@ col_is_factor <- function( preconditions <- NULL values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) diff --git a/R/col_is_integer.R b/R/col_is_integer.R index 01beb84a5..7a513d41b 100644 --- a/R/col_is_integer.R +++ b/R/col_is_integer.R @@ -222,13 +222,10 @@ col_is_integer <- function( preconditions <- NULL values <- NULL - # Capture the `column` expression + # Capture the `columns` expression columns <- rlang::enquo(columns) - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) diff --git a/R/col_is_logical.R b/R/col_is_logical.R index 557d042cd..15d4e9898 100644 --- a/R/col_is_logical.R +++ b/R/col_is_logical.R @@ -219,13 +219,10 @@ col_is_logical <- function( preconditions <- NULL values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) diff --git a/R/col_is_numeric.R b/R/col_is_numeric.R index 5267c42ae..b4dcccddf 100644 --- a/R/col_is_numeric.R +++ b/R/col_is_numeric.R @@ -219,13 +219,10 @@ col_is_numeric <- function( preconditions <- NULL values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) diff --git a/R/col_is_posix.R b/R/col_is_posix.R index 0b68ea347..606da8c0e 100644 --- a/R/col_is_posix.R +++ b/R/col_is_posix.R @@ -219,13 +219,10 @@ col_is_posix <- function( preconditions <- NULL values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) diff --git a/R/col_vals_between.R b/R/col_vals_between.R index 912dd5d0a..efc542722 100644 --- a/R/col_vals_between.R +++ b/R/col_vals_between.R @@ -365,13 +365,10 @@ col_vals_between <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_decreasing.R b/R/col_vals_decreasing.R index 212574e66..a15347b52 100644 --- a/R/col_vals_decreasing.R +++ b/R/col_vals_decreasing.R @@ -346,13 +346,10 @@ col_vals_decreasing <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_equal.R b/R/col_vals_equal.R index 4ee3ce288..6e3aa76be 100644 --- a/R/col_vals_equal.R +++ b/R/col_vals_equal.R @@ -308,13 +308,10 @@ col_vals_equal <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index 442eb1ad8..71cc4f5e1 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -428,13 +428,10 @@ col_vals_gt <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_gte.R b/R/col_vals_gte.R index 74e37abf0..67fc844b9 100644 --- a/R/col_vals_gte.R +++ b/R/col_vals_gte.R @@ -307,13 +307,10 @@ col_vals_gte <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_in_set.R b/R/col_vals_in_set.R index 2b7e93077..622c3fcb6 100644 --- a/R/col_vals_in_set.R +++ b/R/col_vals_in_set.R @@ -301,13 +301,10 @@ col_vals_in_set <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_increasing.R b/R/col_vals_increasing.R index 8f086b3ee..bd99e2329 100644 --- a/R/col_vals_increasing.R +++ b/R/col_vals_increasing.R @@ -334,13 +334,10 @@ col_vals_increasing <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_lt.R b/R/col_vals_lt.R index 3e00356e1..e23153993 100644 --- a/R/col_vals_lt.R +++ b/R/col_vals_lt.R @@ -309,13 +309,10 @@ col_vals_lt <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_lte.R b/R/col_vals_lte.R index f677610c3..2d2bc11da 100644 --- a/R/col_vals_lte.R +++ b/R/col_vals_lte.R @@ -310,13 +310,10 @@ col_vals_lte <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_make_set.R b/R/col_vals_make_set.R index ffddb1d7a..d4792350c 100644 --- a/R/col_vals_make_set.R +++ b/R/col_vals_make_set.R @@ -303,13 +303,10 @@ col_vals_make_set <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_make_subset.R b/R/col_vals_make_subset.R index 2a09a3bd6..4a369d85e 100644 --- a/R/col_vals_make_subset.R +++ b/R/col_vals_make_subset.R @@ -300,13 +300,10 @@ col_vals_make_subset <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_not_between.R b/R/col_vals_not_between.R index 717fab982..38a6ebcb3 100644 --- a/R/col_vals_not_between.R +++ b/R/col_vals_not_between.R @@ -368,13 +368,10 @@ col_vals_not_between <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_not_equal.R b/R/col_vals_not_equal.R index cb1ea016e..5b8092bea 100644 --- a/R/col_vals_not_equal.R +++ b/R/col_vals_not_equal.R @@ -307,13 +307,10 @@ col_vals_not_equal <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_not_in_set.R b/R/col_vals_not_in_set.R index c0e481049..33ddb8e57 100644 --- a/R/col_vals_not_in_set.R +++ b/R/col_vals_not_in_set.R @@ -297,13 +297,10 @@ col_vals_not_in_set <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_not_null.R b/R/col_vals_not_null.R index 3b941cd5a..1305baabb 100644 --- a/R/col_vals_not_null.R +++ b/R/col_vals_not_null.R @@ -288,13 +288,10 @@ col_vals_not_null <- function( values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_null.R b/R/col_vals_null.R index 81bfeaafb..53165a682 100644 --- a/R/col_vals_null.R +++ b/R/col_vals_null.R @@ -287,13 +287,10 @@ col_vals_null <- function( values <- NULL - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_regex.R b/R/col_vals_regex.R index 627f73d9d..b1d8d7b3d 100644 --- a/R/col_vals_regex.R +++ b/R/col_vals_regex.R @@ -301,13 +301,10 @@ col_vals_regex <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/col_vals_within_spec.R b/R/col_vals_within_spec.R index 2e4d32887..d3aeff087 100644 --- a/R/col_vals_within_spec.R +++ b/R/col_vals_within_spec.R @@ -363,13 +363,10 @@ col_vals_within_spec <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions) diff --git a/R/rows_complete.R b/R/rows_complete.R index 408217180..2ff01af62 100644 --- a/R/rows_complete.R +++ b/R/rows_complete.R @@ -271,13 +271,12 @@ rows_complete <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) + + # Default to `everything()` if (rlang::quo_is_null(columns)) { columns <- rlang::quo(tidyselect::everything()) } diff --git a/R/rows_distinct.R b/R/rows_distinct.R index 52ce850f3..118dc687f 100644 --- a/R/rows_distinct.R +++ b/R/rows_distinct.R @@ -272,13 +272,12 @@ rows_distinct <- function( active = TRUE ) { - # Get `columns` as a label - columns_expr <- - rlang::as_label(rlang::quo(!!enquo(columns))) %>% - gsub("^\"|\"$", "", .) - # Capture the `columns` expression columns <- rlang::enquo(columns) + # Get `columns` as a label + columns_expr <- as_columns_expr(columns) + + # Default to `everything()` if (rlang::quo_is_null(columns)) { columns <- rlang::quo(tidyselect::everything()) } diff --git a/R/utils.R b/R/utils.R index 7458b974b..acffba013 100644 --- a/R/utils.R +++ b/R/utils.R @@ -218,6 +218,10 @@ materialize_table <- function(tbl, check = TRUE) { tbl } +as_columns_expr <- function(columns) { + gsub("^\"|\"$", "", rlang::as_label(columns)) +} + is_secret_agent <- function(x) { is_ptblank_agent(x) && (x$label == "::QUIET::") } From 22e5b231e82d7b4cae8829f993209e9333f595c2 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 12:14:17 -0400 Subject: [PATCH 24/46] document generic glue and multi-length vector support in label --- R/col_vals_gt.R | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index 71cc4f5e1..312cf59aa 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -131,12 +131,19 @@ #' means that 15 percent of failing test units results in an overall test #' failure. #' -#' @param label *An optional label for the validation step* +#' @param label *Optional label for the validation step* #' -#' `scalar` // *default:* `NULL` (`optional`) +#' `vector` // *default:* `NULL` (`optional`) #' -#' An optional label for the validation step. This label appears in the -#' *agent* report and, for the best appearance, it should be kept quite short. +#' Optional label for the validation step. This label appears in the *agent* +#' report and, for the best appearance, it should be kept quite short. +#' +#' Label may be a single string or a vector of labels that match the number +#' of expanded steps (typically, the number of column-segment combinations). +#' +#' For validations that get expanded into multiple steps internally, `label` +#' exposes information about the current step via `{glue}` syntax (e.g. +#' "{.col}" for column name). #' #' @param brief *Brief description for the validation step* #' From 883078c5321143fc9cb2c598a88029656e1f94dd Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 12:26:55 -0400 Subject: [PATCH 25/46] point to Label section for more info --- R/col_vals_gt.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index 312cf59aa..a40a2bb1e 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -143,7 +143,7 @@ #' #' For validations that get expanded into multiple steps internally, `label` #' exposes information about the current step via `{glue}` syntax (e.g. -#' "{.col}" for column name). +#' "{.col}" for column name). See the *Label* section for more information. #' #' @param brief *Brief description for the validation step* #' From 12002d0adbc2a5782468ca327e1e9dfc7938ff92 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 12:39:37 -0400 Subject: [PATCH 26/46] give tidy-select to columns argument signature and reference dplyr select() --- R/col_vals_gt.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index a40a2bb1e..a7ac810a4 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -53,10 +53,11 @@ #' #' @param columns *The target columns* #' -#' `` // **required** +#' `` // **required** #' -#' The column (or a set of columns, provided as a character vector) to which -#' this validation should be applied. +#' A column-selecting expression, as one would use inside `dplyr::select()`. +#' Specifies the column (or a set of columns) to which this validation should +#' be applied. See the *Column Names* section for more information. #' #' @param value *Value for comparison* #' From 56d82ffa19d997a5fca05e862c8edab766d893f7 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 12:48:32 -0400 Subject: [PATCH 27/46] update Column Names section --- R/col_vals_gt.R | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index a7ac810a4..e23f55a8b 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -201,12 +201,17 @@ #' #' @section Column Names: #' +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' #' If providing multiple column names to `columns`, the result will be an #' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' From dbd424dd72131dd4a02e948d4baf783a75cb977b Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 12:58:38 -0400 Subject: [PATCH 28/46] add Labels section --- R/col_vals_gt.R | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index e23f55a8b..46d44d721 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -137,14 +137,8 @@ #' `vector` // *default:* `NULL` (`optional`) #' #' Optional label for the validation step. This label appears in the *agent* -#' report and, for the best appearance, it should be kept quite short. -#' -#' Label may be a single string or a vector of labels that match the number -#' of expanded steps (typically, the number of column-segment combinations). -#' -#' For validations that get expanded into multiple steps internally, `label` -#' exposes information about the current step via `{glue}` syntax (e.g. -#' "{.col}" for column name). See the *Label* section for more information. +#' report and, for the best appearance, it should be kept quite short. See +#' the *Labels* section for more information. #' #' @param brief *Brief description for the validation step* #' @@ -286,6 +280,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (ex: `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this From 2748a5cd63c7c075b576d1718d153e003fe4dcd3 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 13:03:49 -0400 Subject: [PATCH 29/46] wording --- R/col_vals_gt.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index 46d44d721..f9507758d 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -200,8 +200,8 @@ #' are also supported, such as `contains("date")` and `where(is.double)`. If #' passing an *external vector* of columns, it should be wrapped in `all_of()`. #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., #' `c(col_a, col_b)` will result in the entry of two validation steps). #' #' Previously, columns could be specified in `vars()`. This continues to work, From 701ce840911551534d0e1bc2fdc46e8083b94b46 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 14:10:25 -0400 Subject: [PATCH 30/46] keep e.g. style --- R/col_vals_gt.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/col_vals_gt.R b/R/col_vals_gt.R index f9507758d..4ef1d6a8a 100644 --- a/R/col_vals_gt.R +++ b/R/col_vals_gt.R @@ -292,7 +292,7 @@ #' - `"{.seg_val}"`: The current segment's value/group #' #' The glue context also supports ordinary expressions for further flexibility -#' (ex: `"{toupper(.step)}"`) as long as they return a length-1 string. +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. #' #' @section Briefs: #' From 045aa70e859bb2e6b09ceda9e05ae59b081db003 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 14:50:15 -0400 Subject: [PATCH 31/46] explicit everything() default for columns arg in formals --- R/rows_complete.R | 12 ++++++------ R/rows_distinct.R | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/rows_complete.R b/R/rows_complete.R index 2ff01af62..16684cafc 100644 --- a/R/rows_complete.R +++ b/R/rows_complete.R @@ -261,7 +261,7 @@ NULL #' @export rows_complete <- function( x, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, segments = NULL, actions = NULL, @@ -273,14 +273,14 @@ rows_complete <- function( # Capture the `columns` expression columns <- rlang::enquo(columns) + # `rows_*()` functions default to `everything()` + if (rlang::quo_is_missing(columns) || rlang::quo_is_null(columns)) { + # `everything()` isn't namespaced to `{tidyselect}` for leaner yaml writing + columns <- rlang::new_quosure(call("everything"), rlang::caller_env()) + } # Get `columns` as a label columns_expr <- as_columns_expr(columns) - # Default to `everything()` - if (rlang::quo_is_null(columns)) { - columns <- rlang::quo(tidyselect::everything()) - } - # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) diff --git a/R/rows_distinct.R b/R/rows_distinct.R index 118dc687f..0111ab6ca 100644 --- a/R/rows_distinct.R +++ b/R/rows_distinct.R @@ -262,7 +262,7 @@ NULL #' @export rows_distinct <- function( x, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, segments = NULL, actions = NULL, @@ -274,14 +274,14 @@ rows_distinct <- function( # Capture the `columns` expression columns <- rlang::enquo(columns) + # `rows_*()` functions default to `everything()` + if (rlang::quo_is_missing(columns) || rlang::quo_is_null(columns)) { + # `everything()` isn't namespaced to `{tidyselect}` for leaner yaml writing + columns <- rlang::new_quosure(call("everything"), rlang::caller_env()) + } # Get `columns` as a label columns_expr <- as_columns_expr(columns) - # Default to `everything()` - if (rlang::quo_is_null(columns)) { - columns <- rlang::quo(tidyselect::everything()) - } - # Resolve the columns based on the expression columns <- resolve_columns(x = x, var_expr = columns, preconditions = NULL) From aefc63362326541e7be2a9160f0e9176e5246bdb Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 14:50:46 -0400 Subject: [PATCH 32/46] repeat for expect and test --- R/rows_complete.R | 4 ++-- R/rows_distinct.R | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/rows_complete.R b/R/rows_complete.R index 16684cafc..884c4cb6f 100644 --- a/R/rows_complete.R +++ b/R/rows_complete.R @@ -376,7 +376,7 @@ rows_complete <- function( #' @export expect_rows_complete <- function( object, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, threshold = 1 ) { @@ -431,7 +431,7 @@ expect_rows_complete <- function( #' @export test_rows_complete <- function( object, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, threshold = 1 ) { diff --git a/R/rows_distinct.R b/R/rows_distinct.R index 0111ab6ca..8a05585f8 100644 --- a/R/rows_distinct.R +++ b/R/rows_distinct.R @@ -377,7 +377,7 @@ rows_distinct <- function( #' @export expect_rows_distinct <- function( object, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, threshold = 1 ) { @@ -432,7 +432,7 @@ expect_rows_distinct <- function( #' @export test_rows_distinct <- function( object, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, threshold = 1 ) { From f787627260de2902d3e8c237bf7b4dce858cd44a Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 14:54:44 -0400 Subject: [PATCH 33/46] separate out yaml tests for columns --- tests/testthat/test-tidyselect-yaml_columns.R | 32 ++++++++++++++++++ tests/testthat/test-tidyselect_integration.R | 33 ------------------- 2 files changed, 32 insertions(+), 33 deletions(-) create mode 100644 tests/testthat/test-tidyselect-yaml_columns.R diff --git a/tests/testthat/test-tidyselect-yaml_columns.R b/tests/testthat/test-tidyselect-yaml_columns.R new file mode 100644 index 000000000..8574c2cdd --- /dev/null +++ b/tests/testthat/test-tidyselect-yaml_columns.R @@ -0,0 +1,32 @@ +test_that("explicit c()-expr make the yaml roundtrip", { + + agent_pre <- create_agent(~ small_table) %>% + col_vals_lt( + columns = c(a, c), + value = 8 + ) + + agent_yaml <- tempfile() + yaml_write(agent_pre, expanded = FALSE, filename = agent_yaml) + # Writes to c()-expr + expect_true(any(grepl("columns: c(a, c)", readLines(agent_yaml), fixed = TRUE))) + + agent_post <- yaml_read_agent(agent_yaml) + # yaml_agent_string(agent_post, expanded = FALSE) + + expect_identical( + as_agent_yaml_list(agent_pre, expanded = FALSE), + as_agent_yaml_list(agent_post, expanded = FALSE) + ) + expect_identical( + agent_pre %>% interrogate() %>% get_agent_report(display_table = FALSE), + agent_post %>% interrogate() %>% get_agent_report(display_table = FALSE) + ) + + # Defaults writing to c()-expr + expect_message( + create_agent(~ small_table) %>% col_exists(a) %>% yaml_agent_string(), + "columns: c\\(a\\)" + ) + +}) diff --git a/tests/testthat/test-tidyselect_integration.R b/tests/testthat/test-tidyselect_integration.R index ae53bbe20..081e11932 100644 --- a/tests/testthat/test-tidyselect_integration.R +++ b/tests/testthat/test-tidyselect_integration.R @@ -241,36 +241,3 @@ test_that("c()-expr works for serially", { ) }) - -test_that("explicit c()-expr make the yaml roundtrip", { - - agent_pre <- create_agent(~ small_table) %>% - col_vals_lt( - columns = c(a, c), - value = 8 - ) - - agent_yaml <- tempfile() - yaml_write(agent_pre, expanded = FALSE, filename = agent_yaml) - # Writes to c()-expr - expect_true(any(grepl("columns: c(a, c)", readLines(agent_yaml), fixed = TRUE))) - - agent_post <- yaml_read_agent(agent_yaml) - # yaml_agent_string(agent_post, expanded = FALSE) - - expect_identical( - as_agent_yaml_list(agent_pre, expanded = FALSE), - as_agent_yaml_list(agent_post, expanded = FALSE) - ) - expect_identical( - agent_pre %>% interrogate() %>% get_agent_report(display_table = FALSE), - agent_post %>% interrogate() %>% get_agent_report(display_table = FALSE) - ) - - # Defaults writing to c()-expr - testthat::expect_message( - create_agent(~ small_table) %>% col_exists(a) %>% yaml_agent_string(), - "columns: c\\(a\\)" - ) - -}) From 7bfa3e7f44b0697f3462ce01580c526c69508596 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 14:59:06 -0400 Subject: [PATCH 34/46] prune NULL=everything() code --- R/rows_complete.R | 7 +++---- R/rows_distinct.R | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/R/rows_complete.R b/R/rows_complete.R index 884c4cb6f..308a99d1a 100644 --- a/R/rows_complete.R +++ b/R/rows_complete.R @@ -273,10 +273,9 @@ rows_complete <- function( # Capture the `columns` expression columns <- rlang::enquo(columns) - # `rows_*()` functions default to `everything()` - if (rlang::quo_is_missing(columns) || rlang::quo_is_null(columns)) { - # `everything()` isn't namespaced to `{tidyselect}` for leaner yaml writing - columns <- rlang::new_quosure(call("everything"), rlang::caller_env()) + # `rows_*()` functions treat `NULL` as `everything()` + if (rlang::quo_is_null(columns)) { + columns <- rlang::quo(tidyselect::everything()) } # Get `columns` as a label columns_expr <- as_columns_expr(columns) diff --git a/R/rows_distinct.R b/R/rows_distinct.R index 8a05585f8..e0fb808ac 100644 --- a/R/rows_distinct.R +++ b/R/rows_distinct.R @@ -274,10 +274,9 @@ rows_distinct <- function( # Capture the `columns` expression columns <- rlang::enquo(columns) - # `rows_*()` functions default to `everything()` - if (rlang::quo_is_missing(columns) || rlang::quo_is_null(columns)) { - # `everything()` isn't namespaced to `{tidyselect}` for leaner yaml writing - columns <- rlang::new_quosure(call("everything"), rlang::caller_env()) + # `rows_*()` functions treat `NULL` as `everything()` + if (rlang::quo_is_null(columns)) { + columns <- rlang::quo(tidyselect::everything()) } # Get `columns` as a label columns_expr <- as_columns_expr(columns) From a3db90afe9957489db08cf850d77f36a2beb667a Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 16:02:25 -0400 Subject: [PATCH 35/46] rows*() functions write column exprs to yaml --- R/yaml_write.R | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/R/yaml_write.R b/R/yaml_write.R index e0a373eba..96674ab13 100644 --- a/R/yaml_write.R +++ b/R/yaml_write.R @@ -1327,16 +1327,16 @@ as_agent_yaml_list <- function(agent, expanded) { } else if (validation_fn %in% c("rows_distinct", "rows_complete")) { - if (is.na(step_list$column[[1]][[1]])) { - vars_cols <- NULL - } else { - vars_cols <- as_c_fn(step_list$column[[1]]) - } + column_text <- + get_column_text( + step_list = step_list, + expanded = expanded + ) lst_step <- list( validation_fn = list( - columns = vars_cols, + columns = column_text, preconditions = as_list_preconditions(step_list$preconditions), segments = as_list_segments(step_list$seg_expr), actions = as_action_levels( @@ -1561,6 +1561,9 @@ get_column_text <- function(step_list, expanded) { column_text <- step_list$columns_expr } + # Strip tidyselect namespacing for leaner yaml writing + column_text <- gsub("\\btidyselect::", "", column_text) + } else { column_text <- as_c_fn(columns = step_list$column[[1]]) From da379f90c55ab28f3b5deb4e0412dad3f5334f6a Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 16:03:06 -0400 Subject: [PATCH 36/46] edit tests to expect column exprs from rows* functions --- tests/testthat/test-yaml.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test-yaml.R b/tests/testthat/test-yaml.R index 9fa9d57a7..22ba9bcdc 100644 --- a/tests/testthat/test-yaml.R +++ b/tests/testthat/test-yaml.R @@ -800,19 +800,19 @@ test_that("Individual validation steps make the YAML round-trip successfully", { expect_equal( get_oneline_expr_str(agent %>% rows_distinct()), - "rows_distinct(columns = c(date_time, date, a, b, c, d, e, f))" + "rows_distinct(columns = everything())" ) expect_equal( get_oneline_expr_str(agent %>% rows_distinct(columns = vars(a, b))), - "rows_distinct(columns = c(a, b))" + "rows_distinct(columns = vars(a, b))" ) expect_equal( get_oneline_expr_str(agent %>% rows_distinct(columns = vars(a, b), preconditions = ~ . %>% dplyr::filter(a > 0))), - "rows_distinct(columns = c(a, b),preconditions = ~. %>% dplyr::filter(a > 0))" + "rows_distinct(columns = vars(a, b),preconditions = ~. %>% dplyr::filter(a > 0))" ) expect_equal( get_oneline_expr_str(agent %>% rows_distinct(columns = vars(a, b), label = "my_label")), - "rows_distinct(columns = c(a, b),label = \"my_label\")" + "rows_distinct(columns = vars(a, b),label = \"my_label\")" ) # From 559be0c569a2ae029b1cf9dfb1723601931b32ae Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 16:06:37 -0400 Subject: [PATCH 37/46] test everything() round-tripping --- tests/testthat/test-tidyselect-yaml_columns.R | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/testthat/test-tidyselect-yaml_columns.R b/tests/testthat/test-tidyselect-yaml_columns.R index 8574c2cdd..2f9865fbb 100644 --- a/tests/testthat/test-tidyselect-yaml_columns.R +++ b/tests/testthat/test-tidyselect-yaml_columns.R @@ -30,3 +30,29 @@ test_that("explicit c()-expr make the yaml roundtrip", { ) }) + +test_that("everything() default in `rows_*()` makes yaml roundtrip", { + + agent_distinct <- create_agent(~ small_table) %>% + rows_distinct() + agent_complete <- create_agent(~ small_table) %>% + rows_complete() + + expect_message(yaml_agent_string(agent_distinct), "columns: everything\\(\\)") + expect_message(yaml_agent_string(agent_complete), "columns: everything\\(\\)") + + agent_yaml <- tempfile() + # everything() makes yaml round trip for `rows_distinct()` + yaml_write(agent_distinct, expanded = FALSE, filename = agent_yaml) + expect_identical( + as_agent_yaml_list(agent_distinct, expanded = FALSE), + as_agent_yaml_list(yaml_read_agent(agent_yaml), expanded = FALSE) + ) + # everything() makes yaml round trip for `rows_complete()` + yaml_write(agent_complete, expanded = FALSE, filename = agent_yaml) + expect_identical( + as_agent_yaml_list(agent_complete, expanded = FALSE), + as_agent_yaml_list(yaml_read_agent(agent_yaml), expanded = FALSE) + ) + +}) \ No newline at end of file From 8ae7d5a0e0c84ca67f7ff2b86eae943e23bcc28b Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 16:31:36 -0400 Subject: [PATCH 38/46] document() --- man/col_count_match.Rd | 9 ++++--- man/col_exists.Rd | 9 ++++--- man/col_is_character.Rd | 16 ++++++------ man/col_is_date.Rd | 16 ++++++------ man/col_is_factor.Rd | 16 ++++++------ man/col_is_integer.Rd | 16 ++++++------ man/col_is_logical.Rd | 16 ++++++------ man/col_is_numeric.Rd | 16 ++++++------ man/col_is_posix.Rd | 16 ++++++------ man/col_schema_match.Rd | 9 ++++--- man/col_vals_between.Rd | 16 ++++++------ man/col_vals_decreasing.Rd | 16 ++++++------ man/col_vals_equal.Rd | 16 ++++++------ man/col_vals_expr.Rd | 9 ++++--- man/col_vals_gt.Rd | 50 +++++++++++++++++++++++++++---------- man/col_vals_gte.Rd | 16 ++++++------ man/col_vals_in_set.Rd | 16 ++++++------ man/col_vals_increasing.Rd | 16 ++++++------ man/col_vals_lt.Rd | 16 ++++++------ man/col_vals_lte.Rd | 16 ++++++------ man/col_vals_make_set.Rd | 16 ++++++------ man/col_vals_make_subset.Rd | 16 ++++++------ man/col_vals_not_between.Rd | 16 ++++++------ man/col_vals_not_equal.Rd | 16 ++++++------ man/col_vals_not_in_set.Rd | 16 ++++++------ man/col_vals_not_null.Rd | 16 ++++++------ man/col_vals_null.Rd | 16 ++++++------ man/col_vals_regex.Rd | 16 ++++++------ man/col_vals_within_spec.Rd | 16 ++++++------ man/conjointly.Rd | 9 ++++--- man/row_count_match.Rd | 9 ++++--- man/rows_complete.Rd | 27 ++++++++++++-------- man/rows_distinct.Rd | 27 ++++++++++++-------- man/serially.Rd | 9 ++++--- man/specially.Rd | 9 ++++--- man/tbl_match.Rd | 9 ++++--- 36 files changed, 332 insertions(+), 237 deletions(-) diff --git a/man/col_count_match.Rd b/man/col_count_match.Rd index 4c06835f6..4a2280327 100644 --- a/man/col_count_match.Rd +++ b/man/col_count_match.Rd @@ -77,12 +77,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_exists.Rd b/man/col_exists.Rd index 05fe38284..3272b0900 100644 --- a/man/col_exists.Rd +++ b/man/col_exists.Rd @@ -61,12 +61,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_is_character.Rd b/man/col_is_character.Rd index cc491e2b0..ae83e2ff4 100644 --- a/man/col_is_character.Rd +++ b/man/col_is_character.Rd @@ -31,10 +31,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{actions}{\emph{Thresholds and actions for different states} @@ -60,12 +61,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_is_date.Rd b/man/col_is_date.Rd index 2a028e88d..38b88f279 100644 --- a/man/col_is_date.Rd +++ b/man/col_is_date.Rd @@ -31,10 +31,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{actions}{\emph{Thresholds and actions for different states} @@ -60,12 +61,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_is_factor.Rd b/man/col_is_factor.Rd index 91dc636e7..e667cbc4e 100644 --- a/man/col_is_factor.Rd +++ b/man/col_is_factor.Rd @@ -31,10 +31,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{actions}{\emph{Thresholds and actions for different states} @@ -60,12 +61,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_is_integer.Rd b/man/col_is_integer.Rd index 494e1953f..ba54dfe10 100644 --- a/man/col_is_integer.Rd +++ b/man/col_is_integer.Rd @@ -31,10 +31,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{actions}{\emph{Thresholds and actions for different states} @@ -60,12 +61,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_is_logical.Rd b/man/col_is_logical.Rd index 3cd1f2fa0..ada017093 100644 --- a/man/col_is_logical.Rd +++ b/man/col_is_logical.Rd @@ -31,10 +31,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{actions}{\emph{Thresholds and actions for different states} @@ -60,12 +61,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_is_numeric.Rd b/man/col_is_numeric.Rd index e23adff0c..d68787b7e 100644 --- a/man/col_is_numeric.Rd +++ b/man/col_is_numeric.Rd @@ -31,10 +31,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{actions}{\emph{Thresholds and actions for different states} @@ -60,12 +61,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_is_posix.Rd b/man/col_is_posix.Rd index 24c6695af..9d2752321 100644 --- a/man/col_is_posix.Rd +++ b/man/col_is_posix.Rd @@ -31,10 +31,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{actions}{\emph{Thresholds and actions for different states} @@ -60,12 +61,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_schema_match.Rd b/man/col_schema_match.Rd index aea64c3d8..1563bbe3d 100644 --- a/man/col_schema_match.Rd +++ b/man/col_schema_match.Rd @@ -110,12 +110,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_between.Rd b/man/col_vals_between.Rd index 7ea4186f9..d7e2e8421 100644 --- a/man/col_vals_between.Rd +++ b/man/col_vals_between.Rd @@ -55,10 +55,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{left}{\emph{Definition of left bound} @@ -136,12 +137,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_decreasing.Rd b/man/col_vals_decreasing.Rd index ffc5ca51f..b99293c05 100644 --- a/man/col_vals_decreasing.Rd +++ b/man/col_vals_decreasing.Rd @@ -52,10 +52,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{allow_stationary}{\emph{Allowance for stationary pauses in values} @@ -128,12 +129,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_equal.Rd b/man/col_vals_equal.Rd index 07be17cb4..7f7be1c58 100644 --- a/man/col_vals_equal.Rd +++ b/man/col_vals_equal.Rd @@ -49,10 +49,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{value}{\emph{Value for comparison} @@ -113,12 +114,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_expr.Rd b/man/col_vals_expr.Rd index f065d303c..04df617f2 100644 --- a/man/col_vals_expr.Rd +++ b/man/col_vals_expr.Rd @@ -83,12 +83,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_gt.Rd b/man/col_vals_gt.Rd index bdd25d74f..e33310cfe 100644 --- a/man/col_vals_gt.Rd +++ b/man/col_vals_gt.Rd @@ -49,10 +49,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{value}{\emph{Value for comparison} @@ -113,12 +114,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} @@ -216,12 +218,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ @@ -303,6 +310,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_gte.Rd b/man/col_vals_gte.Rd index 1419e772b..dfe2d2e20 100644 --- a/man/col_vals_gte.Rd +++ b/man/col_vals_gte.Rd @@ -50,10 +50,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{value}{\emph{Value for comparison} @@ -114,12 +115,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_in_set.Rd b/man/col_vals_in_set.Rd index 8a79ac111..720480398 100644 --- a/man/col_vals_in_set.Rd +++ b/man/col_vals_in_set.Rd @@ -40,10 +40,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{set}{\emph{Set of values} @@ -96,12 +97,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_increasing.Rd b/man/col_vals_increasing.Rd index cbe12bcbe..368105829 100644 --- a/man/col_vals_increasing.Rd +++ b/man/col_vals_increasing.Rd @@ -52,10 +52,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{allow_stationary}{\emph{Allowance for stationary pauses in values} @@ -128,12 +129,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_lt.Rd b/man/col_vals_lt.Rd index 7507eadf3..7c09669e5 100644 --- a/man/col_vals_lt.Rd +++ b/man/col_vals_lt.Rd @@ -49,10 +49,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{value}{\emph{Value for comparison} @@ -113,12 +114,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_lte.Rd b/man/col_vals_lte.Rd index e39425e66..0e46196da 100644 --- a/man/col_vals_lte.Rd +++ b/man/col_vals_lte.Rd @@ -50,10 +50,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{value}{\emph{Value for comparison} @@ -114,12 +115,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_make_set.Rd b/man/col_vals_make_set.Rd index eae0fbf0f..b896d5399 100644 --- a/man/col_vals_make_set.Rd +++ b/man/col_vals_make_set.Rd @@ -46,10 +46,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{set}{\emph{Set of values} @@ -102,12 +103,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_make_subset.Rd b/man/col_vals_make_subset.Rd index a10273d50..1cbb9e13a 100644 --- a/man/col_vals_make_subset.Rd +++ b/man/col_vals_make_subset.Rd @@ -46,10 +46,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{set}{\emph{Set of values} @@ -102,12 +103,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_not_between.Rd b/man/col_vals_not_between.Rd index 5ee5086f4..98d7e9f75 100644 --- a/man/col_vals_not_between.Rd +++ b/man/col_vals_not_between.Rd @@ -55,10 +55,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{left}{\emph{Definition of left bound} @@ -136,12 +137,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_not_equal.Rd b/man/col_vals_not_equal.Rd index 1d3fee130..3ebc43923 100644 --- a/man/col_vals_not_equal.Rd +++ b/man/col_vals_not_equal.Rd @@ -49,10 +49,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{value}{\emph{Value for comparison} @@ -113,12 +114,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_not_in_set.Rd b/man/col_vals_not_in_set.Rd index 5e352f4cb..ab6c1bdc1 100644 --- a/man/col_vals_not_in_set.Rd +++ b/man/col_vals_not_in_set.Rd @@ -46,10 +46,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{set}{\emph{Set of values} @@ -102,12 +103,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_not_null.Rd b/man/col_vals_not_null.Rd index 918c7eaf9..a04430cf8 100644 --- a/man/col_vals_not_null.Rd +++ b/man/col_vals_not_null.Rd @@ -33,10 +33,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{preconditions}{\emph{Input table modification prior to validation} @@ -82,12 +83,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_null.Rd b/man/col_vals_null.Rd index 0747a195f..10b3c42a8 100644 --- a/man/col_vals_null.Rd +++ b/man/col_vals_null.Rd @@ -33,10 +33,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{preconditions}{\emph{Input table modification prior to validation} @@ -82,12 +83,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_regex.Rd b/man/col_vals_regex.Rd index 5e487dd28..19255e4d6 100644 --- a/man/col_vals_regex.Rd +++ b/man/col_vals_regex.Rd @@ -49,10 +49,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{regex}{\emph{Regex pattern} @@ -112,12 +113,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/col_vals_within_spec.Rd b/man/col_vals_within_spec.Rd index 619e84282..a701ebda8 100644 --- a/man/col_vals_within_spec.Rd +++ b/man/col_vals_within_spec.Rd @@ -49,10 +49,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{spec}{\emph{Specification type} @@ -113,12 +114,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/conjointly.Rd b/man/conjointly.Rd index 4c954bda9..08326e0d1 100644 --- a/man/conjointly.Rd +++ b/man/conjointly.Rd @@ -103,12 +103,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/row_count_match.Rd b/man/row_count_match.Rd index 9ffae4436..6dae4bed8 100644 --- a/man/row_count_match.Rd +++ b/man/row_count_match.Rd @@ -101,12 +101,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/rows_complete.Rd b/man/rows_complete.Rd index d3cec58a1..27ab94494 100644 --- a/man/rows_complete.Rd +++ b/man/rows_complete.Rd @@ -8,7 +8,7 @@ \usage{ rows_complete( x, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, segments = NULL, actions = NULL, @@ -20,12 +20,17 @@ rows_complete( expect_rows_complete( object, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, threshold = 1 ) -test_rows_complete(object, columns = NULL, preconditions = NULL, threshold = 1) +test_rows_complete( + object, + columns = tidyselect::everything(), + preconditions = NULL, + threshold = 1 +) } \arguments{ \item{x}{\emph{A pointblank agent or a data table} @@ -38,10 +43,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{preconditions}{\emph{Input table modification prior to validation} @@ -87,12 +93,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/rows_distinct.Rd b/man/rows_distinct.Rd index 78ea71240..febf3335f 100644 --- a/man/rows_distinct.Rd +++ b/man/rows_distinct.Rd @@ -8,7 +8,7 @@ \usage{ rows_distinct( x, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, segments = NULL, actions = NULL, @@ -20,12 +20,17 @@ rows_distinct( expect_rows_distinct( object, - columns = NULL, + columns = tidyselect::everything(), preconditions = NULL, threshold = 1 ) -test_rows_distinct(object, columns = NULL, preconditions = NULL, threshold = 1) +test_rows_distinct( + object, + columns = tidyselect::everything(), + preconditions = NULL, + threshold = 1 +) } \arguments{ \item{x}{\emph{A pointblank agent or a data table} @@ -38,10 +43,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \strong{required} -The column (or a set of columns, provided as a character vector) to which -this validation should be applied.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{preconditions}{\emph{Input table modification prior to validation} @@ -87,12 +93,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/serially.Rd b/man/serially.Rd index 166edb091..4bf8a1c40 100644 --- a/man/serially.Rd +++ b/man/serially.Rd @@ -97,12 +97,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/specially.Rd b/man/specially.Rd index c84da92f9..bb9030d69 100644 --- a/man/specially.Rd +++ b/man/specially.Rd @@ -72,12 +72,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} diff --git a/man/tbl_match.Rd b/man/tbl_match.Rd index b69e7999b..ac0fd9a1b 100644 --- a/man/tbl_match.Rd +++ b/man/tbl_match.Rd @@ -86,12 +86,13 @@ produce (influenced by the number of \code{columns} provided), (2) be an ID string not used in any previous validation step, and (3) be a vector with unique values.} -\item{label}{\emph{An optional label for the validation step} +\item{label}{\emph{Optional label for the validation step} -\verb{scalar} // \emph{default:} \code{NULL} (\code{optional}) +\verb{vector} // \emph{default:} \code{NULL} (\code{optional}) -An optional label for the validation step. This label appears in the -\emph{agent} report and, for the best appearance, it should be kept quite short.} +Optional label for the validation step. This label appears in the \emph{agent} +report and, for the best appearance, it should be kept quite short. See +the \emph{Labels} section for more information.} \item{brief}{\emph{Brief description for the validation step} From dfad34286e84a589595b58105098cb62cbb74462 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 16:33:51 -0400 Subject: [PATCH 39/46] document everything() default for columns --- R/rows_complete.R | 8 ++++++++ R/rows_distinct.R | 8 ++++++++ man/rows_complete.Rd | 2 +- man/rows_distinct.Rd | 2 +- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/R/rows_complete.R b/R/rows_complete.R index 308a99d1a..1f97d3b64 100644 --- a/R/rows_complete.R +++ b/R/rows_complete.R @@ -37,6 +37,14 @@ #' the following **tidyselect** helper functions: `starts_with()`, #' `ends_with()`, `contains()`, `matches()`, and `everything()`. #' +#' @param columns *The target columns* +#' +#' `` // *default:* `everything()` +#' +#' A column-selecting expression, as one would use inside `dplyr::select()`. +#' Specifies the column (or a set of columns) to which this validation should +#' be applied. See the *Column Names* section for more information. +#' #' @inheritParams col_vals_gt #' #' @return For the validation function, the return value is either a diff --git a/R/rows_distinct.R b/R/rows_distinct.R index e0fb808ac..d85d91968 100644 --- a/R/rows_distinct.R +++ b/R/rows_distinct.R @@ -38,6 +38,14 @@ #' the following **tidyselect** helper functions: `starts_with()`, #' `ends_with()`, `contains()`, `matches()`, and `everything()`. #' +#' @param columns *The target columns* +#' +#' `` // *default:* `everything()` +#' +#' A column-selecting expression, as one would use inside `dplyr::select()`. +#' Specifies the column (or a set of columns) to which this validation should +#' be applied. See the *Column Names* section for more information. +#' #' @inheritParams col_vals_gt #' #' @return For the validation function, the return value is either a diff --git a/man/rows_complete.Rd b/man/rows_complete.Rd index 27ab94494..2078e4229 100644 --- a/man/rows_complete.Rd +++ b/man/rows_complete.Rd @@ -43,7 +43,7 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \emph{default:} \code{everything()} A column-selecting expression, as one would use inside \code{dplyr::select()}. Specifies the column (or a set of columns) to which this validation should diff --git a/man/rows_distinct.Rd b/man/rows_distinct.Rd index febf3335f..3a2cd0dc3 100644 --- a/man/rows_distinct.Rd +++ b/man/rows_distinct.Rd @@ -43,7 +43,7 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -\verb{} // \strong{required} +\verb{} // \emph{default:} \code{everything()} A column-selecting expression, as one would use inside \code{dplyr::select()}. Specifies the column (or a set of columns) to which this validation should From 7b6029f6e5c2cd13e382d9cd61195de30d0ecedd Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 17:16:51 -0400 Subject: [PATCH 40/46] update column names section --- R/col_exists.R | 17 +++++++++++------ R/col_is_character.R | 17 +++++++++++------ R/col_is_date.R | 17 +++++++++++------ R/col_is_factor.R | 17 +++++++++++------ R/col_is_integer.R | 17 +++++++++++------ R/col_is_logical.R | 17 +++++++++++------ R/col_is_numeric.R | 17 +++++++++++------ R/col_is_posix.R | 17 +++++++++++------ R/col_vals_between.R | 17 +++++++++++------ R/col_vals_decreasing.R | 17 +++++++++++------ R/col_vals_equal.R | 17 +++++++++++------ R/col_vals_gte.R | 17 +++++++++++------ R/col_vals_in_set.R | 17 +++++++++++------ R/col_vals_increasing.R | 17 +++++++++++------ R/col_vals_lt.R | 17 +++++++++++------ R/col_vals_lte.R | 17 +++++++++++------ R/col_vals_make_set.R | 17 +++++++++++------ R/col_vals_make_subset.R | 17 +++++++++++------ R/col_vals_not_between.R | 17 +++++++++++------ R/col_vals_not_equal.R | 17 +++++++++++------ R/col_vals_not_in_set.R | 17 +++++++++++------ R/col_vals_not_null.R | 17 +++++++++++------ R/col_vals_null.R | 17 +++++++++++------ R/col_vals_regex.R | 17 +++++++++++------ R/col_vals_within_spec.R | 17 +++++++++++------ R/conjointly.R | 17 +++++++++++------ R/serially.R | 17 +++++++++++------ 27 files changed, 297 insertions(+), 162 deletions(-) diff --git a/R/col_exists.R b/R/col_exists.R index de90be3ab..d76cce5f3 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -69,12 +69,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Actions: #' diff --git a/R/col_is_character.R b/R/col_is_character.R index 598c73884..fe46a34be 100644 --- a/R/col_is_character.R +++ b/R/col_is_character.R @@ -63,12 +63,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Actions: #' diff --git a/R/col_is_date.R b/R/col_is_date.R index e30ce1d51..4d491dda3 100644 --- a/R/col_is_date.R +++ b/R/col_is_date.R @@ -63,12 +63,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Actions: #' diff --git a/R/col_is_factor.R b/R/col_is_factor.R index 1c107c03d..fdbdf58d2 100644 --- a/R/col_is_factor.R +++ b/R/col_is_factor.R @@ -63,12 +63,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Actions: #' diff --git a/R/col_is_integer.R b/R/col_is_integer.R index 7a513d41b..6c6c5e865 100644 --- a/R/col_is_integer.R +++ b/R/col_is_integer.R @@ -63,12 +63,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Actions: #' diff --git a/R/col_is_logical.R b/R/col_is_logical.R index 15d4e9898..66356a6a3 100644 --- a/R/col_is_logical.R +++ b/R/col_is_logical.R @@ -63,12 +63,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Actions: #' diff --git a/R/col_is_numeric.R b/R/col_is_numeric.R index b4dcccddf..05269183c 100644 --- a/R/col_is_numeric.R +++ b/R/col_is_numeric.R @@ -63,12 +63,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Actions: #' diff --git a/R/col_is_posix.R b/R/col_is_posix.R index 606da8c0e..0fe1680f0 100644 --- a/R/col_is_posix.R +++ b/R/col_is_posix.R @@ -63,12 +63,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Actions: #' diff --git a/R/col_vals_between.R b/R/col_vals_between.R index efc542722..3c0412121 100644 --- a/R/col_vals_between.R +++ b/R/col_vals_between.R @@ -95,12 +95,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_decreasing.R b/R/col_vals_decreasing.R index a15347b52..10610d4cb 100644 --- a/R/col_vals_decreasing.R +++ b/R/col_vals_decreasing.R @@ -85,12 +85,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_equal.R b/R/col_vals_equal.R index 6e3aa76be..76faf3a3b 100644 --- a/R/col_vals_equal.R +++ b/R/col_vals_equal.R @@ -71,12 +71,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_gte.R b/R/col_vals_gte.R index 67fc844b9..2332b1d4a 100644 --- a/R/col_vals_gte.R +++ b/R/col_vals_gte.R @@ -73,12 +73,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_in_set.R b/R/col_vals_in_set.R index 622c3fcb6..b6072ddc1 100644 --- a/R/col_vals_in_set.R +++ b/R/col_vals_in_set.R @@ -69,12 +69,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Preconditions: #' diff --git a/R/col_vals_increasing.R b/R/col_vals_increasing.R index bd99e2329..36fdd9915 100644 --- a/R/col_vals_increasing.R +++ b/R/col_vals_increasing.R @@ -85,12 +85,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_lt.R b/R/col_vals_lt.R index e23153993..dade2fa3b 100644 --- a/R/col_vals_lt.R +++ b/R/col_vals_lt.R @@ -72,12 +72,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_lte.R b/R/col_vals_lte.R index 2d2bc11da..500ce3136 100644 --- a/R/col_vals_lte.R +++ b/R/col_vals_lte.R @@ -73,12 +73,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_make_set.R b/R/col_vals_make_set.R index d4792350c..ec852c682 100644 --- a/R/col_vals_make_set.R +++ b/R/col_vals_make_set.R @@ -73,12 +73,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Preconditions: #' diff --git a/R/col_vals_make_subset.R b/R/col_vals_make_subset.R index 4a369d85e..470ebd161 100644 --- a/R/col_vals_make_subset.R +++ b/R/col_vals_make_subset.R @@ -69,12 +69,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Preconditions: #' diff --git a/R/col_vals_not_between.R b/R/col_vals_not_between.R index 38a6ebcb3..ffca2d61b 100644 --- a/R/col_vals_not_between.R +++ b/R/col_vals_not_between.R @@ -96,12 +96,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names to `columns`, the result will be an -#' expansion of validation steps to that number of column names (e.g., -#' `vars(col_a, col_b)` will result in the entry of two validation steps). Aside -#' from column names in quotes and in `vars()`, **tidyselect** helper functions -#' are available for specifying columns. They are: `starts_with()`, -#' `ends_with()`, `contains()`, `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_not_equal.R b/R/col_vals_not_equal.R index 5b8092bea..b66847295 100644 --- a/R/col_vals_not_equal.R +++ b/R/col_vals_not_equal.R @@ -70,12 +70,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_not_in_set.R b/R/col_vals_not_in_set.R index 33ddb8e57..e58ac67a3 100644 --- a/R/col_vals_not_in_set.R +++ b/R/col_vals_not_in_set.R @@ -69,12 +69,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Preconditions: #' diff --git a/R/col_vals_not_null.R b/R/col_vals_not_null.R index 1305baabb..0a130a5d4 100644 --- a/R/col_vals_not_null.R +++ b/R/col_vals_not_null.R @@ -63,12 +63,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Preconditions: #' diff --git a/R/col_vals_null.R b/R/col_vals_null.R index 53165a682..c686f817c 100644 --- a/R/col_vals_null.R +++ b/R/col_vals_null.R @@ -62,12 +62,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Preconditions: #' diff --git a/R/col_vals_regex.R b/R/col_vals_regex.R index b1d8d7b3d..0c4c2efa5 100644 --- a/R/col_vals_regex.R +++ b/R/col_vals_regex.R @@ -69,12 +69,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/col_vals_within_spec.R b/R/col_vals_within_spec.R index d3aeff087..b701651b7 100644 --- a/R/col_vals_within_spec.R +++ b/R/col_vals_within_spec.R @@ -119,12 +119,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names, the result will be an expansion of -#' validation steps to that number of column names (e.g., `vars(col_a, col_b)` -#' will result in the entry of two validation steps). Aside from column names in -#' quotes and in `vars()`, **tidyselect** helper functions are available for -#' specifying columns. They are: `starts_with()`, `ends_with()`, `contains()`, -#' `matches()`, and `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Missing Values: #' diff --git a/R/conjointly.R b/R/conjointly.R index 390a0ee2e..efa953dff 100644 --- a/R/conjointly.R +++ b/R/conjointly.R @@ -89,12 +89,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names in any of the supplied validation steps, -#' the result will be an expansion of sub-validation steps to that number of -#' column names. Aside from column names in quotes and in `vars()`, -#' **tidyselect** helper functions are available for specifying columns. They -#' are: `starts_with()`, `ends_with()`, `contains()`, `matches()`, and -#' `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Preconditions: #' diff --git a/R/serially.R b/R/serially.R index cdb9f91ed..06c3f4e3e 100644 --- a/R/serially.R +++ b/R/serially.R @@ -118,12 +118,17 @@ #' #' @section Column Names: #' -#' If providing multiple column names in any of the supplied validation steps, -#' the result will be an expansion of sub-validation steps to that number of -#' column names. Aside from column names in quotes and in `vars()`, -#' **tidyselect** helper functions are available for specifying columns. They -#' are: `starts_with()`, `ends_with()`, `contains()`, `matches()`, and -#' `everything()`. +#' `columns` may be a single column (as symbol `a` or string `"a"`) or a vector +#' of columns (`c(a, b, c)` or `c("a", "b", "c")`). `{tidyselect}` helpers +#' are also supported, such as `contains("date")` and `where(is.double)`. If +#' passing an *external vector* of columns, it should be wrapped in `all_of()`. +#' +#' When multiple columns are selected by `columns`, the result will be an +#' expansion of validation steps to that number of columns (e.g., +#' `c(col_a, col_b)` will result in the entry of two validation steps). +#' +#' Previously, columns could be specified in `vars()`. This continues to work, +#' but `c()` offers the same capability and supersedes `vars()` in `columns`. #' #' @section Preconditions: #' From de6ec55c19e328f6cbb8f263c56d24c38d90b4c2 Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 17:17:00 -0400 Subject: [PATCH 41/46] document() --- man/col_exists.Rd | 17 +++++++++++------ man/col_is_character.Rd | 17 +++++++++++------ man/col_is_date.Rd | 17 +++++++++++------ man/col_is_factor.Rd | 17 +++++++++++------ man/col_is_integer.Rd | 17 +++++++++++------ man/col_is_logical.Rd | 17 +++++++++++------ man/col_is_numeric.Rd | 17 +++++++++++------ man/col_is_posix.Rd | 17 +++++++++++------ man/col_vals_between.Rd | 17 +++++++++++------ man/col_vals_decreasing.Rd | 17 +++++++++++------ man/col_vals_equal.Rd | 17 +++++++++++------ man/col_vals_gte.Rd | 17 +++++++++++------ man/col_vals_in_set.Rd | 17 +++++++++++------ man/col_vals_increasing.Rd | 17 +++++++++++------ man/col_vals_lt.Rd | 17 +++++++++++------ man/col_vals_lte.Rd | 17 +++++++++++------ man/col_vals_make_set.Rd | 17 +++++++++++------ man/col_vals_make_subset.Rd | 17 +++++++++++------ man/col_vals_not_between.Rd | 17 +++++++++++------ man/col_vals_not_equal.Rd | 17 +++++++++++------ man/col_vals_not_in_set.Rd | 17 +++++++++++------ man/col_vals_not_null.Rd | 17 +++++++++++------ man/col_vals_null.Rd | 17 +++++++++++------ man/col_vals_regex.Rd | 17 +++++++++++------ man/col_vals_within_spec.Rd | 17 +++++++++++------ man/conjointly.Rd | 17 +++++++++++------ man/serially.Rd | 17 +++++++++++------ 27 files changed, 297 insertions(+), 162 deletions(-) diff --git a/man/col_exists.Rd b/man/col_exists.Rd index 3272b0900..a631eba1b 100644 --- a/man/col_exists.Rd +++ b/man/col_exists.Rd @@ -162,12 +162,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Actions}{ diff --git a/man/col_is_character.Rd b/man/col_is_character.Rd index ae83e2ff4..34efe3dda 100644 --- a/man/col_is_character.Rd +++ b/man/col_is_character.Rd @@ -164,12 +164,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Actions}{ diff --git a/man/col_is_date.Rd b/man/col_is_date.Rd index 38b88f279..a90d4f198 100644 --- a/man/col_is_date.Rd +++ b/man/col_is_date.Rd @@ -164,12 +164,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Actions}{ diff --git a/man/col_is_factor.Rd b/man/col_is_factor.Rd index e667cbc4e..610ff97ec 100644 --- a/man/col_is_factor.Rd +++ b/man/col_is_factor.Rd @@ -164,12 +164,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Actions}{ diff --git a/man/col_is_integer.Rd b/man/col_is_integer.Rd index ba54dfe10..cc0e4508f 100644 --- a/man/col_is_integer.Rd +++ b/man/col_is_integer.Rd @@ -164,12 +164,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Actions}{ diff --git a/man/col_is_logical.Rd b/man/col_is_logical.Rd index ada017093..ffd331d00 100644 --- a/man/col_is_logical.Rd +++ b/man/col_is_logical.Rd @@ -164,12 +164,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Actions}{ diff --git a/man/col_is_numeric.Rd b/man/col_is_numeric.Rd index d68787b7e..34c70a403 100644 --- a/man/col_is_numeric.Rd +++ b/man/col_is_numeric.Rd @@ -164,12 +164,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Actions}{ diff --git a/man/col_is_posix.Rd b/man/col_is_posix.Rd index 9d2752321..75422320e 100644 --- a/man/col_is_posix.Rd +++ b/man/col_is_posix.Rd @@ -164,12 +164,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Actions}{ diff --git a/man/col_vals_between.Rd b/man/col_vals_between.Rd index d7e2e8421..f4a8e486f 100644 --- a/man/col_vals_between.Rd +++ b/man/col_vals_between.Rd @@ -247,12 +247,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_decreasing.Rd b/man/col_vals_decreasing.Rd index b99293c05..5747a7197 100644 --- a/man/col_vals_decreasing.Rd +++ b/man/col_vals_decreasing.Rd @@ -234,12 +234,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_equal.Rd b/man/col_vals_equal.Rd index 7f7be1c58..fc419f404 100644 --- a/man/col_vals_equal.Rd +++ b/man/col_vals_equal.Rd @@ -217,12 +217,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_gte.Rd b/man/col_vals_gte.Rd index dfe2d2e20..9977db3ee 100644 --- a/man/col_vals_gte.Rd +++ b/man/col_vals_gte.Rd @@ -219,12 +219,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_in_set.Rd b/man/col_vals_in_set.Rd index 720480398..5f572e691 100644 --- a/man/col_vals_in_set.Rd +++ b/man/col_vals_in_set.Rd @@ -199,12 +199,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Preconditions}{ diff --git a/man/col_vals_increasing.Rd b/man/col_vals_increasing.Rd index 368105829..72b00df78 100644 --- a/man/col_vals_increasing.Rd +++ b/man/col_vals_increasing.Rd @@ -234,12 +234,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_lt.Rd b/man/col_vals_lt.Rd index 7c09669e5..8258a789b 100644 --- a/man/col_vals_lt.Rd +++ b/man/col_vals_lt.Rd @@ -218,12 +218,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_lte.Rd b/man/col_vals_lte.Rd index 0e46196da..337579b0c 100644 --- a/man/col_vals_lte.Rd +++ b/man/col_vals_lte.Rd @@ -219,12 +219,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_make_set.Rd b/man/col_vals_make_set.Rd index b896d5399..bd425c6f8 100644 --- a/man/col_vals_make_set.Rd +++ b/man/col_vals_make_set.Rd @@ -209,12 +209,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Preconditions}{ diff --git a/man/col_vals_make_subset.Rd b/man/col_vals_make_subset.Rd index 1cbb9e13a..e36ada9b3 100644 --- a/man/col_vals_make_subset.Rd +++ b/man/col_vals_make_subset.Rd @@ -205,12 +205,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Preconditions}{ diff --git a/man/col_vals_not_between.Rd b/man/col_vals_not_between.Rd index 98d7e9f75..dd8430456 100644 --- a/man/col_vals_not_between.Rd +++ b/man/col_vals_not_between.Rd @@ -247,12 +247,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names to \code{columns}, the result will be an -expansion of validation steps to that number of column names (e.g., -\code{vars(col_a, col_b)} will result in the entry of two validation steps). Aside -from column names in quotes and in \code{vars()}, \strong{tidyselect} helper functions -are available for specifying columns. They are: \code{starts_with()}, -\code{ends_with()}, \code{contains()}, \code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_not_equal.Rd b/man/col_vals_not_equal.Rd index 3ebc43923..33d5a2558 100644 --- a/man/col_vals_not_equal.Rd +++ b/man/col_vals_not_equal.Rd @@ -216,12 +216,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_not_in_set.Rd b/man/col_vals_not_in_set.Rd index ab6c1bdc1..a1e128192 100644 --- a/man/col_vals_not_in_set.Rd +++ b/man/col_vals_not_in_set.Rd @@ -205,12 +205,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Preconditions}{ diff --git a/man/col_vals_not_null.Rd b/man/col_vals_not_null.Rd index a04430cf8..1a5c1a902 100644 --- a/man/col_vals_not_null.Rd +++ b/man/col_vals_not_null.Rd @@ -186,12 +186,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Preconditions}{ diff --git a/man/col_vals_null.Rd b/man/col_vals_null.Rd index 10b3c42a8..1ce45361b 100644 --- a/man/col_vals_null.Rd +++ b/man/col_vals_null.Rd @@ -185,12 +185,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Preconditions}{ diff --git a/man/col_vals_regex.Rd b/man/col_vals_regex.Rd index 19255e4d6..b5976cadc 100644 --- a/man/col_vals_regex.Rd +++ b/man/col_vals_regex.Rd @@ -215,12 +215,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/col_vals_within_spec.Rd b/man/col_vals_within_spec.Rd index a701ebda8..0043844a7 100644 --- a/man/col_vals_within_spec.Rd +++ b/man/col_vals_within_spec.Rd @@ -268,12 +268,17 @@ Only a single \code{spec} value should be provided per function call. \section{Column Names}{ -If providing multiple column names, the result will be an expansion of -validation steps to that number of column names (e.g., \code{vars(col_a, col_b)} -will result in the entry of two validation steps). Aside from column names in -quotes and in \code{vars()}, \strong{tidyselect} helper functions are available for -specifying columns. They are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, -\code{matches()}, and \code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Missing Values}{ diff --git a/man/conjointly.Rd b/man/conjointly.Rd index 08326e0d1..7424a6543 100644 --- a/man/conjointly.Rd +++ b/man/conjointly.Rd @@ -217,12 +217,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names in any of the supplied validation steps, -the result will be an expansion of sub-validation steps to that number of -column names. Aside from column names in quotes and in \code{vars()}, -\strong{tidyselect} helper functions are available for specifying columns. They -are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, \code{matches()}, and -\code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Preconditions}{ diff --git a/man/serially.Rd b/man/serially.Rd index 4bf8a1c40..6788f69e1 100644 --- a/man/serially.Rd +++ b/man/serially.Rd @@ -235,12 +235,17 @@ formally tested (so be mindful of this when using unsupported backends with \section{Column Names}{ -If providing multiple column names in any of the supplied validation steps, -the result will be an expansion of sub-validation steps to that number of -column names. Aside from column names in quotes and in \code{vars()}, -\strong{tidyselect} helper functions are available for specifying columns. They -are: \code{starts_with()}, \code{ends_with()}, \code{contains()}, \code{matches()}, and -\code{everything()}. +\code{columns} may be a single column (as symbol \code{a} or string \code{"a"}) or a vector +of columns (\code{c(a, b, c)} or \code{c("a", "b", "c")}). \code{{tidyselect}} helpers +are also supported, such as \code{contains("date")} and \code{where(is.double)}. If +passing an \emph{external vector} of columns, it should be wrapped in \code{all_of()}. + +When multiple columns are selected by \code{columns}, the result will be an +expansion of validation steps to that number of columns (e.g., +\code{c(col_a, col_b)} will result in the entry of two validation steps). + +Previously, columns could be specified in \code{vars()}. This continues to work, +but \code{c()} offers the same capability and supersedes \code{vars()} in \code{columns}. } \section{Preconditions}{ From 732ef046719ecd9deac9ddd36d01c1479ced032f Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 17:18:39 -0400 Subject: [PATCH 42/46] col_exists inherits tidyselect column signature --- R/col_exists.R | 8 -------- man/col_exists.Rd | 8 ++++---- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/R/col_exists.R b/R/col_exists.R index d76cce5f3..c206a2ab9 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -34,14 +34,6 @@ #' #' @inheritParams col_vals_gt #' -#' @param columns *The target columns* -#' -#' `vector|vars()`` // **required** -#' -#' One or more columns from the table in focus. This can be -#' provided as a vector of column names using `c()` or bare column names -#' enclosed in [vars()]. -#' #' @return For the validation function, the return value is either a #' `ptblank_agent` object or a table object (depending on whether an agent #' object or a table was passed to `x`). The expectation function invisibly diff --git a/man/col_exists.Rd b/man/col_exists.Rd index a631eba1b..c27cd9040 100644 --- a/man/col_exists.Rd +++ b/man/col_exists.Rd @@ -31,11 +31,11 @@ commonly created with \code{\link[=create_agent]{create_agent()}}.} \item{columns}{\emph{The target columns} -`vector\if{html}{\out{}}|vars(\if{html}{\out{}})`` // \strong{required} +\verb{} // \strong{required} -One or more columns from the table in focus. This can be -provided as a vector of column names using \code{c()} or bare column names -enclosed in \code{\link[=vars]{vars()}}.} +A column-selecting expression, as one would use inside \code{dplyr::select()}. +Specifies the column (or a set of columns) to which this validation should +be applied. See the \emph{Column Names} section for more information.} \item{actions}{\emph{Thresholds and actions for different states} From 7bb6050e3ac584410efac9acf2b6ddfdd58656bc Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 17:24:11 -0400 Subject: [PATCH 43/46] add Labels section to individual functions --- R/col_count_match.R | 11 +++++++++++ R/col_exists.R | 12 ++++++++++++ R/col_is_character.R | 12 ++++++++++++ R/col_is_date.R | 12 ++++++++++++ R/col_is_factor.R | 12 ++++++++++++ R/col_is_integer.R | 12 ++++++++++++ R/col_is_logical.R | 12 ++++++++++++ R/col_is_numeric.R | 12 ++++++++++++ R/col_is_posix.R | 12 ++++++++++++ R/col_schema_match.R | 11 +++++++++++ R/col_vals_between.R | 14 ++++++++++++++ R/col_vals_decreasing.R | 14 ++++++++++++++ R/col_vals_equal.R | 14 ++++++++++++++ R/col_vals_expr.R | 14 ++++++++++++++ R/col_vals_gte.R | 14 ++++++++++++++ R/col_vals_in_set.R | 14 ++++++++++++++ R/col_vals_increasing.R | 14 ++++++++++++++ R/col_vals_lt.R | 14 ++++++++++++++ R/col_vals_lte.R | 14 ++++++++++++++ R/col_vals_make_set.R | 14 ++++++++++++++ R/col_vals_make_subset.R | 14 ++++++++++++++ R/col_vals_not_between.R | 14 ++++++++++++++ R/col_vals_not_equal.R | 14 ++++++++++++++ R/col_vals_not_in_set.R | 14 ++++++++++++++ R/col_vals_not_null.R | 14 ++++++++++++++ R/col_vals_null.R | 14 ++++++++++++++ R/col_vals_regex.R | 14 ++++++++++++++ R/col_vals_within_spec.R | 14 ++++++++++++++ R/conjointly.R | 13 +++++++++++++ R/row_count_match.R | 13 +++++++++++++ R/rows_complete.R | 14 ++++++++++++++ R/rows_distinct.R | 14 ++++++++++++++ R/serially.R | 11 +++++++++++ R/specially.R | 11 +++++++++++ R/tbl_match.R | 13 +++++++++++++ 35 files changed, 459 insertions(+) diff --git a/R/col_count_match.R b/R/col_count_match.R index 2efee2074..5f392d43e 100644 --- a/R/col_count_match.R +++ b/R/col_count_match.R @@ -103,6 +103,17 @@ #' depending on the situation (the first produces a warning, the other #' `stop()`s). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_exists.R b/R/col_exists.R index c206a2ab9..6f415f092 100644 --- a/R/col_exists.R +++ b/R/col_exists.R @@ -86,6 +86,18 @@ #' depending on the situation (the first produces a warning, the other #' `stop()`s). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_is_character.R b/R/col_is_character.R index fe46a34be..19078db4f 100644 --- a/R/col_is_character.R +++ b/R/col_is_character.R @@ -89,6 +89,18 @@ #' 1)` or `action_levels(stop_at = 1)` are good choices depending on the #' situation (the first produces a warning, the other will `stop()`). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_is_date.R b/R/col_is_date.R index 4d491dda3..169b015f3 100644 --- a/R/col_is_date.R +++ b/R/col_is_date.R @@ -89,6 +89,18 @@ #' 1)` or `action_levels(stop_at = 1)` are good choices depending on the #' situation (the first produces a warning, the other will `stop()`). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_is_factor.R b/R/col_is_factor.R index fdbdf58d2..875e0ef50 100644 --- a/R/col_is_factor.R +++ b/R/col_is_factor.R @@ -89,6 +89,18 @@ #' 1)` or `action_levels(stop_at = 1)` are good choices depending on the #' situation (the first produces a warning, the other will `stop()`). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_is_integer.R b/R/col_is_integer.R index 6c6c5e865..425878210 100644 --- a/R/col_is_integer.R +++ b/R/col_is_integer.R @@ -89,6 +89,18 @@ #' 1)` or `action_levels(stop_at = 1)` are good choices depending on the #' situation (the first produces a warning, the other will `stop()`). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_is_logical.R b/R/col_is_logical.R index 66356a6a3..c09a43745 100644 --- a/R/col_is_logical.R +++ b/R/col_is_logical.R @@ -89,6 +89,18 @@ #' 1)` or `action_levels(stop_at = 1)` are good choices depending on the #' situation (the first produces a warning, the other will `stop()`). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_is_numeric.R b/R/col_is_numeric.R index 05269183c..17b952955 100644 --- a/R/col_is_numeric.R +++ b/R/col_is_numeric.R @@ -89,6 +89,18 @@ #' 1)` or `action_levels(stop_at = 1)` are good choices depending on the #' situation (the first produces a warning, the other will `stop()`). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_is_posix.R b/R/col_is_posix.R index 0fe1680f0..f54c71ea1 100644 --- a/R/col_is_posix.R +++ b/R/col_is_posix.R @@ -89,6 +89,18 @@ #' 1)` or `action_levels(stop_at = 1)` are good choices depending on the #' situation (the first produces a warning, the other will `stop()`). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_schema_match.R b/R/col_schema_match.R index b775adea6..a7dd48d11 100644 --- a/R/col_schema_match.R +++ b/R/col_schema_match.R @@ -131,6 +131,17 @@ #' depending on the situation (the first produces a warning, the other #' `stop()`s). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_between.R b/R/col_vals_between.R index 3c0412121..f59dc0671 100644 --- a/R/col_vals_between.R +++ b/R/col_vals_between.R @@ -180,6 +180,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_decreasing.R b/R/col_vals_decreasing.R index 10610d4cb..3b23bfa37 100644 --- a/R/col_vals_decreasing.R +++ b/R/col_vals_decreasing.R @@ -170,6 +170,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_equal.R b/R/col_vals_equal.R index 76faf3a3b..b741ed458 100644 --- a/R/col_vals_equal.R +++ b/R/col_vals_equal.R @@ -156,6 +156,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_expr.R b/R/col_vals_expr.R index b0e34a4b0..29b5fd5dc 100644 --- a/R/col_vals_expr.R +++ b/R/col_vals_expr.R @@ -134,6 +134,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_gte.R b/R/col_vals_gte.R index 2332b1d4a..2a2e071ee 100644 --- a/R/col_vals_gte.R +++ b/R/col_vals_gte.R @@ -157,6 +157,20 @@ #' situation (the first produces a warning when a quarter of the total test #' units fails, the other `stop()`s at the same threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_in_set.R b/R/col_vals_in_set.R index b6072ddc1..b00bfd2b0 100644 --- a/R/col_vals_in_set.R +++ b/R/col_vals_in_set.R @@ -147,6 +147,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_increasing.R b/R/col_vals_increasing.R index 36fdd9915..69b231970 100644 --- a/R/col_vals_increasing.R +++ b/R/col_vals_increasing.R @@ -170,6 +170,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_lt.R b/R/col_vals_lt.R index dade2fa3b..e0eb9ca1e 100644 --- a/R/col_vals_lt.R +++ b/R/col_vals_lt.R @@ -157,6 +157,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_lte.R b/R/col_vals_lte.R index 500ce3136..32e68424f 100644 --- a/R/col_vals_lte.R +++ b/R/col_vals_lte.R @@ -158,6 +158,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_make_set.R b/R/col_vals_make_set.R index ec852c682..369915d98 100644 --- a/R/col_vals_make_set.R +++ b/R/col_vals_make_set.R @@ -151,6 +151,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_make_subset.R b/R/col_vals_make_subset.R index 470ebd161..f3702a513 100644 --- a/R/col_vals_make_subset.R +++ b/R/col_vals_make_subset.R @@ -147,6 +147,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_not_between.R b/R/col_vals_not_between.R index ffca2d61b..2d942d22f 100644 --- a/R/col_vals_not_between.R +++ b/R/col_vals_not_between.R @@ -181,6 +181,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_not_equal.R b/R/col_vals_not_equal.R index b66847295..5ca5524d8 100644 --- a/R/col_vals_not_equal.R +++ b/R/col_vals_not_equal.R @@ -155,6 +155,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_not_in_set.R b/R/col_vals_not_in_set.R index e58ac67a3..5a4834586 100644 --- a/R/col_vals_not_in_set.R +++ b/R/col_vals_not_in_set.R @@ -147,6 +147,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_not_null.R b/R/col_vals_not_null.R index 0a130a5d4..ae3f59c0b 100644 --- a/R/col_vals_not_null.R +++ b/R/col_vals_not_null.R @@ -141,6 +141,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_null.R b/R/col_vals_null.R index c686f817c..70ed09f59 100644 --- a/R/col_vals_null.R +++ b/R/col_vals_null.R @@ -140,6 +140,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_regex.R b/R/col_vals_regex.R index 0c4c2efa5..d3b8fec9d 100644 --- a/R/col_vals_regex.R +++ b/R/col_vals_regex.R @@ -154,6 +154,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/col_vals_within_spec.R b/R/col_vals_within_spec.R index b701651b7..095da54ac 100644 --- a/R/col_vals_within_spec.R +++ b/R/col_vals_within_spec.R @@ -204,6 +204,20 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/conjointly.R b/R/conjointly.R index efa953dff..0230362c4 100644 --- a/R/conjointly.R +++ b/R/conjointly.R @@ -167,6 +167,19 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/row_count_match.R b/R/row_count_match.R index 972c65c86..b7816f102 100644 --- a/R/row_count_match.R +++ b/R/row_count_match.R @@ -137,6 +137,19 @@ #' depending on the situation (the first produces a warning, the other #' `stop()`s). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/rows_complete.R b/R/rows_complete.R index 1f97d3b64..169aab692 100644 --- a/R/rows_complete.R +++ b/R/rows_complete.R @@ -134,6 +134,20 @@ #' warning when a quarter of the total test units fails, the other `stop()`s at #' the same threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/rows_distinct.R b/R/rows_distinct.R index d85d91968..70a803b3e 100644 --- a/R/rows_distinct.R +++ b/R/rows_distinct.R @@ -135,6 +135,20 @@ #' warning when a quarter of the total test units fails, the other `stop()`s at #' the same threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.col}"`: The current column name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/serially.R b/R/serially.R index 06c3f4e3e..e9cb9db9b 100644 --- a/R/serially.R +++ b/R/serially.R @@ -165,6 +165,17 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/specially.R b/R/specially.R index 05c74dd11..af19ac8c0 100644 --- a/R/specially.R +++ b/R/specially.R @@ -104,6 +104,17 @@ #' quarter of the total test units fails, the other `stop()`s at the same #' threshold level). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this diff --git a/R/tbl_match.R b/R/tbl_match.R index d9029772b..201b4dd5f 100644 --- a/R/tbl_match.R +++ b/R/tbl_match.R @@ -126,6 +126,19 @@ #' depending on the situation (the first produces a warning, the other #' `stop()`s). #' +#' @section Labels: +#' +#' `label` may be a single string or a character vector that matches the number +#' of expanded steps. `label` also supports `{glue}` syntax and exposes the +#' following dynamic variables contextualized to the current step: +#' +#' - `"{.step}"`: The validation step name +#' - `"{.seg_col}"`: The current segment's column name +#' - `"{.seg_val}"`: The current segment's value/group +#' +#' The glue context also supports ordinary expressions for further flexibility +#' (e.g., `"{toupper(.step)}"`) as long as they return a length-1 string. +#' #' @section Briefs: #' #' Want to describe this validation step in some detail? Keep in mind that this From 43356ec91c46f3d478092bb66f597877109b8ecd Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 17:24:46 -0400 Subject: [PATCH 44/46] document() --- man/col_count_match.Rd | 14 ++++++++++++++ man/col_exists.Rd | 15 +++++++++++++++ man/col_is_character.Rd | 15 +++++++++++++++ man/col_is_date.Rd | 15 +++++++++++++++ man/col_is_factor.Rd | 15 +++++++++++++++ man/col_is_integer.Rd | 15 +++++++++++++++ man/col_is_logical.Rd | 15 +++++++++++++++ man/col_is_numeric.Rd | 15 +++++++++++++++ man/col_is_posix.Rd | 15 +++++++++++++++ man/col_schema_match.Rd | 14 ++++++++++++++ man/col_vals_between.Rd | 17 +++++++++++++++++ man/col_vals_decreasing.Rd | 17 +++++++++++++++++ man/col_vals_equal.Rd | 17 +++++++++++++++++ man/col_vals_expr.Rd | 17 +++++++++++++++++ man/col_vals_gte.Rd | 17 +++++++++++++++++ man/col_vals_in_set.Rd | 17 +++++++++++++++++ man/col_vals_increasing.Rd | 17 +++++++++++++++++ man/col_vals_lt.Rd | 17 +++++++++++++++++ man/col_vals_lte.Rd | 17 +++++++++++++++++ man/col_vals_make_set.Rd | 17 +++++++++++++++++ man/col_vals_make_subset.Rd | 17 +++++++++++++++++ man/col_vals_not_between.Rd | 17 +++++++++++++++++ man/col_vals_not_equal.Rd | 17 +++++++++++++++++ man/col_vals_not_in_set.Rd | 17 +++++++++++++++++ man/col_vals_not_null.Rd | 17 +++++++++++++++++ man/col_vals_null.Rd | 17 +++++++++++++++++ man/col_vals_regex.Rd | 17 +++++++++++++++++ man/col_vals_within_spec.Rd | 17 +++++++++++++++++ man/conjointly.Rd | 16 ++++++++++++++++ man/row_count_match.Rd | 16 ++++++++++++++++ man/rows_complete.Rd | 17 +++++++++++++++++ man/rows_distinct.Rd | 17 +++++++++++++++++ man/serially.Rd | 14 ++++++++++++++ man/specially.Rd | 14 ++++++++++++++ man/tbl_match.Rd | 16 ++++++++++++++++ 35 files changed, 564 insertions(+) diff --git a/man/col_count_match.Rd b/man/col_count_match.Rd index 4a2280327..dc9fe43f3 100644 --- a/man/col_count_match.Rd +++ b/man/col_count_match.Rd @@ -211,6 +211,20 @@ depending on the situation (the first produces a warning, the other \code{stop()}s). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_exists.Rd b/man/col_exists.Rd index c27cd9040..121f574cf 100644 --- a/man/col_exists.Rd +++ b/man/col_exists.Rd @@ -190,6 +190,21 @@ depending on the situation (the first produces a warning, the other \code{stop()}s). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_is_character.Rd b/man/col_is_character.Rd index 34efe3dda..e063e4a99 100644 --- a/man/col_is_character.Rd +++ b/man/col_is_character.Rd @@ -192,6 +192,21 @@ happens. For the \verb{col_is_*()}-type functions, using \code{action_levels(war situation (the first produces a warning, the other will \code{stop()}). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_is_date.Rd b/man/col_is_date.Rd index a90d4f198..46971b63a 100644 --- a/man/col_is_date.Rd +++ b/man/col_is_date.Rd @@ -192,6 +192,21 @@ happens. For the \verb{col_is_*()}-type functions, using \code{action_levels(war situation (the first produces a warning, the other will \code{stop()}). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_is_factor.Rd b/man/col_is_factor.Rd index 610ff97ec..70c585a2b 100644 --- a/man/col_is_factor.Rd +++ b/man/col_is_factor.Rd @@ -192,6 +192,21 @@ happens. For the \verb{col_is_*()}-type functions, using \code{action_levels(war situation (the first produces a warning, the other will \code{stop()}). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_is_integer.Rd b/man/col_is_integer.Rd index cc0e4508f..158a26f03 100644 --- a/man/col_is_integer.Rd +++ b/man/col_is_integer.Rd @@ -192,6 +192,21 @@ happens. For the \verb{col_is_*()}-type functions, using \code{action_levels(war situation (the first produces a warning, the other will \code{stop()}). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_is_logical.Rd b/man/col_is_logical.Rd index ffd331d00..2c683c3c7 100644 --- a/man/col_is_logical.Rd +++ b/man/col_is_logical.Rd @@ -192,6 +192,21 @@ happens. For the \verb{col_is_*()}-type functions, using \code{action_levels(war situation (the first produces a warning, the other will \code{stop()}). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_is_numeric.Rd b/man/col_is_numeric.Rd index 34c70a403..fff4c549c 100644 --- a/man/col_is_numeric.Rd +++ b/man/col_is_numeric.Rd @@ -192,6 +192,21 @@ happens. For the \verb{col_is_*()}-type functions, using \code{action_levels(war situation (the first produces a warning, the other will \code{stop()}). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_is_posix.Rd b/man/col_is_posix.Rd index 75422320e..a966e0006 100644 --- a/man/col_is_posix.Rd +++ b/man/col_is_posix.Rd @@ -192,6 +192,21 @@ happens. For the \verb{col_is_*()}-type functions, using \code{action_levels(war situation (the first produces a warning, the other will \code{stop()}). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_schema_match.Rd b/man/col_schema_match.Rd index 1563bbe3d..a15632ae8 100644 --- a/man/col_schema_match.Rd +++ b/man/col_schema_match.Rd @@ -242,6 +242,20 @@ depending on the situation (the first produces a warning, the other \code{stop()}s). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_between.Rd b/man/col_vals_between.Rd index f4a8e486f..299a93b3c 100644 --- a/man/col_vals_between.Rd +++ b/man/col_vals_between.Rd @@ -339,6 +339,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_decreasing.Rd b/man/col_vals_decreasing.Rd index 5747a7197..5b1f08655 100644 --- a/man/col_vals_decreasing.Rd +++ b/man/col_vals_decreasing.Rd @@ -326,6 +326,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_equal.Rd b/man/col_vals_equal.Rd index fc419f404..f2f801f81 100644 --- a/man/col_vals_equal.Rd +++ b/man/col_vals_equal.Rd @@ -309,6 +309,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_expr.Rd b/man/col_vals_expr.Rd index 04df617f2..024cd8559 100644 --- a/man/col_vals_expr.Rd +++ b/man/col_vals_expr.Rd @@ -253,6 +253,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_gte.Rd b/man/col_vals_gte.Rd index 9977db3ee..10008e9fc 100644 --- a/man/col_vals_gte.Rd +++ b/man/col_vals_gte.Rd @@ -309,6 +309,23 @@ situation (the first produces a warning when a quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_in_set.Rd b/man/col_vals_in_set.Rd index 5f572e691..7ad7b19b1 100644 --- a/man/col_vals_in_set.Rd +++ b/man/col_vals_in_set.Rd @@ -283,6 +283,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_increasing.Rd b/man/col_vals_increasing.Rd index 72b00df78..f9f001b59 100644 --- a/man/col_vals_increasing.Rd +++ b/man/col_vals_increasing.Rd @@ -326,6 +326,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_lt.Rd b/man/col_vals_lt.Rd index 8258a789b..5fc5b1679 100644 --- a/man/col_vals_lt.Rd +++ b/man/col_vals_lt.Rd @@ -310,6 +310,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_lte.Rd b/man/col_vals_lte.Rd index 337579b0c..c02103576 100644 --- a/man/col_vals_lte.Rd +++ b/man/col_vals_lte.Rd @@ -311,6 +311,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_make_set.Rd b/man/col_vals_make_set.Rd index bd425c6f8..6520f0873 100644 --- a/man/col_vals_make_set.Rd +++ b/man/col_vals_make_set.Rd @@ -293,6 +293,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_make_subset.Rd b/man/col_vals_make_subset.Rd index e36ada9b3..8a98bc539 100644 --- a/man/col_vals_make_subset.Rd +++ b/man/col_vals_make_subset.Rd @@ -289,6 +289,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_not_between.Rd b/man/col_vals_not_between.Rd index dd8430456..bc3e5abd6 100644 --- a/man/col_vals_not_between.Rd +++ b/man/col_vals_not_between.Rd @@ -339,6 +339,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_not_equal.Rd b/man/col_vals_not_equal.Rd index 33d5a2558..7fdebbb8e 100644 --- a/man/col_vals_not_equal.Rd +++ b/man/col_vals_not_equal.Rd @@ -308,6 +308,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_not_in_set.Rd b/man/col_vals_not_in_set.Rd index a1e128192..cbaa3d6b1 100644 --- a/man/col_vals_not_in_set.Rd +++ b/man/col_vals_not_in_set.Rd @@ -289,6 +289,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_not_null.Rd b/man/col_vals_not_null.Rd index 1a5c1a902..8f30511e3 100644 --- a/man/col_vals_not_null.Rd +++ b/man/col_vals_not_null.Rd @@ -270,6 +270,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_null.Rd b/man/col_vals_null.Rd index 1ce45361b..041993549 100644 --- a/man/col_vals_null.Rd +++ b/man/col_vals_null.Rd @@ -269,6 +269,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_regex.Rd b/man/col_vals_regex.Rd index b5976cadc..314d798d2 100644 --- a/man/col_vals_regex.Rd +++ b/man/col_vals_regex.Rd @@ -307,6 +307,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/col_vals_within_spec.Rd b/man/col_vals_within_spec.Rd index 0043844a7..9736c86b8 100644 --- a/man/col_vals_within_spec.Rd +++ b/man/col_vals_within_spec.Rd @@ -360,6 +360,23 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/conjointly.Rd b/man/conjointly.Rd index 7424a6543..a8e0f5595 100644 --- a/man/conjointly.Rd +++ b/man/conjointly.Rd @@ -301,6 +301,22 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/row_count_match.Rd b/man/row_count_match.Rd index 6dae4bed8..94bf524a6 100644 --- a/man/row_count_match.Rd +++ b/man/row_count_match.Rd @@ -271,6 +271,22 @@ depending on the situation (the first produces a warning, the other \code{stop()}s). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/rows_complete.Rd b/man/rows_complete.Rd index 2078e4229..99b0950e7 100644 --- a/man/rows_complete.Rd +++ b/man/rows_complete.Rd @@ -262,6 +262,23 @@ warning when a quarter of the total test units fails, the other \code{stop()}s a the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/rows_distinct.Rd b/man/rows_distinct.Rd index 3a2cd0dc3..2238cb670 100644 --- a/man/rows_distinct.Rd +++ b/man/rows_distinct.Rd @@ -263,6 +263,23 @@ warning when a quarter of the total test units fails, the other \code{stop()}s a the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.col}"}: The current column name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/serially.Rd b/man/serially.Rd index 6788f69e1..b41205f31 100644 --- a/man/serially.Rd +++ b/man/serially.Rd @@ -286,6 +286,20 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/specially.Rd b/man/specially.Rd index bb9030d69..fa75b99fa 100644 --- a/man/specially.Rd +++ b/man/specially.Rd @@ -210,6 +210,20 @@ quarter of the total test units fails, the other \code{stop()}s at the same threshold level). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ diff --git a/man/tbl_match.Rd b/man/tbl_match.Rd index ac0fd9a1b..2a11d8470 100644 --- a/man/tbl_match.Rd +++ b/man/tbl_match.Rd @@ -246,6 +246,22 @@ depending on the situation (the first produces a warning, the other \code{stop()}s). } +\section{Labels}{ + + +\code{label} may be a single string or a character vector that matches the number +of expanded steps. \code{label} also supports \code{{glue}} syntax and exposes the +following dynamic variables contextualized to the current step: +\itemize{ +\item \code{"{.step}"}: The validation step name +\item \code{"{.seg_col}"}: The current segment's column name +\item \code{"{.seg_val}"}: The current segment's value/group +} + +The glue context also supports ordinary expressions for further flexibility +(e.g., \code{"{toupper(.step)}"}) as long as they return a length-1 string. +} + \section{Briefs}{ From f5a6225bcf3784df8bc9c7d589cceb7f333eecdd Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 17:32:48 -0400 Subject: [PATCH 45/46] add NEWS item for tidyselect in columns --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index 4083353e5..8c8a994d3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,10 @@ ## New features +* Full `{tidyselect}` support for the `columns` argument of all validation functions. You can now use the full range of familiar column-selection expressions that you could also use in `dplyr::select()`. This also begins a process of deprecation: + - `vars()` for selecting columns will continue to work, but `c()` now supersedes `vars()`. + - If passing an *external vector* of column names, it should be wrapped in `all_of()`. + * The `label` argument of validation functions now exposes the following string variables via `{glue}` syntax: - `"{.step}"`: The validation step name From 51099b98bbebc35d593589cf57f6d697453715dd Mon Sep 17 00:00:00 2001 From: June Choe Date: Mon, 30 Oct 2023 19:04:36 -0400 Subject: [PATCH 46/46] remove reference to vars() --- R/yaml_write.R | 15 +++++++-------- man/yaml_agent_string.Rd | 7 +++---- man/yaml_write.Rd | 8 ++++---- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/R/yaml_write.R b/R/yaml_write.R index 96674ab13..0df681503 100644 --- a/R/yaml_write.R +++ b/R/yaml_write.R @@ -81,9 +81,9 @@ #' `scalar` // *default:* `FALSE` #' #' Should the written validation expressions for an *agent* be expanded such -#' that **tidyselect** and [vars()] expressions for columns are evaluated, -#' yielding a validation function per column? By default, this is `FALSE` so -#' expressions as written will be retained in the YAML representation. +#' that **tidyselect** expressions for columns are evaluated, yielding a +#' validation function per column? By default, this is `FALSE` so expressions +#' as written will be retained in the YAML representation. #' #' @param quiet *Inform (or not) upon file writing* #' @@ -180,7 +180,7 @@ #' - col_exists: #' columns: c(date, date_time) #' - col_vals_regex: -#' columns: vars(b) +#' columns: c(b) #' regex: '[0-9]-[a-z]{3}-[0-9]{3}' #' - rows_distinct: #' columns: ~ @@ -576,10 +576,9 @@ yaml_write <- function( #' @param path An optional path to the YAML file (combined with `filename`). #' #' @param expanded Should the written validation expressions for an *agent* be -#' expanded such that **tidyselect** and [vars()] expressions for columns are -#' evaluated, yielding a validation function per column? By default, this is -#' `FALSE` so expressions as written will be retained in the YAML -#' representation. +#' expanded such that **tidyselect** expressions for columns are evaluated, +#' yielding a validation function per column? By default, this is `FALSE` +#' so expressions as written will be retained in the YAML representation. #' #' @return Nothing is returned. Instead, text is printed to the console. #' diff --git a/man/yaml_agent_string.Rd b/man/yaml_agent_string.Rd index c1b1a16f3..9819df6b8 100644 --- a/man/yaml_agent_string.Rd +++ b/man/yaml_agent_string.Rd @@ -17,10 +17,9 @@ provided in \code{agent}.} \item{path}{An optional path to the YAML file (combined with \code{filename}).} \item{expanded}{Should the written validation expressions for an \emph{agent} be -expanded such that \strong{tidyselect} and \code{\link[=vars]{vars()}} expressions for columns are -evaluated, yielding a validation function per column? By default, this is -\code{FALSE} so expressions as written will be retained in the YAML -representation.} +expanded such that \strong{tidyselect} expressions for columns are evaluated, +yielding a validation function per column? By default, this is \code{FALSE} +so expressions as written will be retained in the YAML representation.} } \value{ Nothing is returned. Instead, text is printed to the console. diff --git a/man/yaml_write.Rd b/man/yaml_write.Rd index fdba67379..61430df77 100644 --- a/man/yaml_write.Rd +++ b/man/yaml_write.Rd @@ -54,9 +54,9 @@ An optional path to which the YAML file should be saved (combined with \verb{scalar} // \emph{default:} \code{FALSE} Should the written validation expressions for an \emph{agent} be expanded such -that \strong{tidyselect} and \code{\link[=vars]{vars()}} expressions for columns are evaluated, -yielding a validation function per column? By default, this is \code{FALSE} so -expressions as written will be retained in the YAML representation.} +that \strong{tidyselect} expressions for columns are evaluated, yielding a +validation function per column? By default, this is \code{FALSE} so expressions +as written will be retained in the YAML representation.} \item{quiet}{\emph{Inform (or not) upon file writing} @@ -182,7 +182,7 @@ steps: - col_exists: columns: c(date, date_time) - col_vals_regex: - columns: vars(b) + columns: c(b) regex: '[0-9]-[a-z]\{3\}-[0-9]\{3\}' - rows_distinct: columns: ~