[R] Deprecated filter + across usage
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 91
Description
### Describe the bug, including details regarding any error messages, version, and platform.
:wave: the addition of `across` and family of functions has been such a powerful addition to the arrow R package. Thank you!
Recently in dplyr [itself](https://github.com/tidyverse/dplyr/pull/6468) `filter` + `across` was deprecated. dplyr now throws a warning when trying to do that:
``` r
library(dplyr)
starwars %>%
filter(across(height, ~ .x >= 100))
#> Warning: Using `across()` in `filter()` is deprecated, use `if_any()` or
#> `if_all()`.
```
This is done here in dplyr:
https://github.com/tidyverse/dplyr/blob/4d0ac622c0e33c758b05a1582766fcd438cb79c1/R/filter.R#L269-L277
Right now arrow does not warn:
```r
library(dplyr)
library(arrow)
starwars %>%
arrow_table() %>%
filter(across(height, ~ .x >= 100)) %>%
collect()
```
Though arrow doesn't have the same deprecation plumbing set up my initial thought is that we could add something in here to catch instances when `filter` + `across` are used:
https://github.com/apache/arrow/blob/2078af7c710d688c14313b9486b99c981550a7b7/r/R/dplyr-across.R#L26-L72
### Component(s)
R
Contributor guide
Assessment
This issue has not been assessed yet.