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 a number.
Code
  select_loc(iris, where(mean))
Condition
  Error in `where()`:
  ! Predicate must return `TRUE` or `FALSE`, not a number.


Try the tidyselect package in your browser

Any scripts or data that you put into this service are public.

tidyselect documentation built on May 29, 2024, 6:07 a.m.