
Using a predicate without where() warns
=======================================

> invisible(select_loc(iris, is_integer))
Warning: Predicate functions must be wrapped in `where()`.

  # Bad
  data %>% select(is_integer)

  # Good
  data %>% select(where(is_integer))

i Please update your code.
This message is displayed once per session.

> invisible(select_loc(iris, is.numeric))
Warning: Predicate functions must be wrapped in `where()`.

  # Bad
  data %>% select(is.numeric)

  # Good
  data %>% select(where(is.numeric))

i Please update your code.
This message is displayed once per session.

> invisible(select_loc(iris, isTRUE))
Warning: Predicate functions must be wrapped in `where()`.

  # Bad
  data %>% select(isTRUE)

  # Good
  data %>% select(where(isTRUE))

i Please update your code.
This message is displayed once per session.

> # Warning is not repeated
> invisible(select_loc(iris, is_integer))
> # formula shorthand must be wrapped
> select_loc(mtcars, ~is.numeric(.x))
Error: Formula shorthand must be wrapped in `where()`.

  # Bad
  data %>% select(~is.numeric(.x))

  # Good
  data %>% select(where(~is.numeric(.x)))

> select_loc(mtcars, ~is.numeric(.x) || is.factor(.x) || is.character(.x))
Error: Formula shorthand must be wrapped in `where()`.

  # Bad
  data %>% select(~is.numeric(.x) || is.factor(.x) || is.character(.x))

  # Good
  data %>% select(where(~is.numeric(.x) || is.factor(.x) || is.character(.x)))

> select_loc(mtcars, ~is.numeric(.x) || is.factor(.x) || is.character(.x) ||
+   is.numeric(.x) || is.factor(.x) || is.character(.x))
Error: Formula shorthand must be wrapped in `where()`.

  # Bad
  data %>% select(~...)

  # Good
  data %>% select(where(~...))

