Running examples in ‘eHDPrep-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: identify_inconsistency
> ### Title: Identify inconsistencies in a dataset
> ### Aliases: identify_inconsistency
> 
> ### ** Examples
> 
> require(tibble)
Loading required package: tibble
> # example with synthetic dataset on number of bean counts
> # there is a lot going on in the function so a simple dataset aids this example
> #
> # creating `data`:
> beans <- tibble::tibble(red_beans = 1:15,
+ blue_beans = 1:15,
+ total_beans = 1:15*2,
+ red_bean_summary = c(rep("few_beans",9), rep("many_beans",6)))
> #
> # creating `consis_tbl`
> bean_rules <- tibble::tribble(~varA, ~varB, ~lgl_test, ~varA_boundaries, ~varB_boundaries,
+ "red_beans", "blue_beans", "==", NA, NA,
+ "red_beans", "total_beans", "<=", NA,NA,
+ "red_beans", "red_bean_summary", NA, "1:9", "few_beans",
+ "red_beans", "red_bean_summary", NA, "10:15", "many_beans")
> 
> identify_inconsistency(beans, bean_rules)
Error in `dplyr::mutate()`:
ℹ In argument: `lgl_values = dplyr::na_if(.data$lgl_values, "NA")`.
Caused by error in `dplyr::na_if()`:
! Can't convert `y` <character> to match type of `x` <list>.
Backtrace:
     ▆
  1. ├─eHDPrep::identify_inconsistency(beans, bean_rules)
  2. │ └─... %>% ...
  3. ├─dplyr::mutate(...)
  4. ├─dplyr:::mutate.data.frame(., lgl_values = dplyr::na_if(.data$lgl_values, "NA"))
  5. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  6. │   ├─base::withCallingHandlers(...)
  7. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
  8. │     └─mask$eval_all_mutate(quo)
  9. │       └─dplyr (local) eval()
 10. ├─dplyr::na_if(.data$lgl_values, "NA")
 11. │ └─vctrs::vec_cast(x = y, to = x, x_arg = "y", to_arg = "x")
 12. └─vctrs (local) `<fn>`()
 13.   └─vctrs::vec_default_cast(...)
 14.     ├─base::withRestarts(...)
 15.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
 16.     │   └─base (local) doWithOneRestart(return(expr), restart)
 17.     └─vctrs::stop_incompatible_cast(...)
 18.       └─vctrs::stop_incompatible_type(...)
 19.         └─vctrs:::stop_incompatible(...)
 20.           └─vctrs:::stop_vctrs(...)
 21.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
Execution halted