[R] Add translation for dplyr::na_if()
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 91
Description
Add a translation for the dplyr function [`na_if`](https://dplyr.tidyverse.org/reference/na_if.html). For now this can be implemented via `{}if_else{`}. Later after ARROW-17090 is implemented, this could bind directly to that kernel.
Care should be taken to ensure that the behavior on `NaN` values is consistent with dplyr.
**Reporter**: [Ian Cook](https://issues.apache.org/jira/browse/ARROW-17091) / @ianmcook
#### Related issues:
- [[C++] Add null_if kernel](https://github.com/apache/arrow/issues/32396) (relates to)
**Note**: *This issue was originally created as [ARROW-17091](https://issues.apache.org/jira/browse/ARROW-17091). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Start with the dplyr::na_if() documentation and the existing R translation for if_else. Compare the proposed if_else-based behavior with dplyr, especially for NaN values, and review related issue #32396 for the null_if kernel context. Done means na_if() is translated and its NaN behavior matches dplyr.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100