Skip to contents

Given an agent's validation plan that had undergone interrogation via interrogate(), did every single validation step result in zero failing test units? Using the all_passed() function will let us know whether that's TRUE or not.


all_passed(agent, i = NULL)



An agent object of class ptblank_agent.


A vector of validation step numbers. These values are assigned to each validation step by pointblank in the order of definition. If NULL (the default), all validation steps will be used for the evaluation of complete passing.


A logical value.


The all_passed() function provides a single logical value based on an interrogation performed in the agent-based workflow. For very large-scale validation (where data quality is a known issue, and is perhaps something to be tamed over time) this function is likely to be less useful since it is quite stringent (all test units must pass across all validation steps).

Should there be a requirement for logical values produced from validation, a more flexible alternative is in using the test (test_*()) variants of the validation functions. Each of those produce a single logical value and each and have a threshold option for failure levels. Another option is to utilize post-interrogation objects within the agent's x-list (obtained by using the get_agent_x_list() function). This allows for many possibilities in producing a single logical value from an interrogation.


Create a simple table with a column of numerical values.

tbl <- dplyr::tibble(a = c(4, 5, 7, 8))


## # A tibble: 4 × 1
##       a
##   <dbl>
## 1     4
## 2     5
## 3     7
## 4     8

Validate that values in column a are always greater than 4.

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)) %>%

Determine if these column validations have all passed by using all_passed() (they do).

all_passed(agent = agent)

## [1] TRUE

Function ID


See also