tests/testthat/_snaps/helpers-where.md

where() checks return values

Code
  where(NA)
Condition
  Error in `where()`:
  ! Can't convert `fn`, a logical vector, to a function.
Code
  select_loc(iris, where(~NA))
Condition
  Error in `where()`:
  ! Predicate must return `TRUE` or `FALSE`, not `NA`.
Code
  select_loc(iris, where(~1))
Condition
  Error in `where()`:
  ! Predicate must return `TRUE` or `FALSE`, not the number 1.
Code
  select_loc(iris, where(mean))
Condition
  Error in `where()`:
  ! Predicate must return `TRUE` or `FALSE`, not the number 5.84.


r-lib/tidyselect documentation built on Dec. 3, 2024, 12:24 p.m.