[R] Add slice() method
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
Rescoped to be just `slice()`. The other functions were implemented in ARROW-13766.
Original description:
-----
Implement [`slice()`, `slice_head()`, and `slice_tail()`](https://dplyr.tidyverse.org/reference/slice.html) methods for `ArrowTabular`, `Dataset`, and `arrow_dplyr_query` objects . I believe this should be relatively straightforward, using `Take()` to return only the specified rows. We already have a `head()` method which I believe we can reuse for `slice_head()`.
**Reporter**: [Ian Cook](https://issues.apache.org/jira/browse/ARROW-13767) / @ianmcook
#### Related issues:
- [[R] Add Arrow methods slice_min(), slice_max()](https://github.com/apache/arrow/issues/29394) (relates to)
**Note**: *This issue was originally created as [ARROW-13767](https://issues.apache.org/jira/browse/ARROW-13767). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Start by locating the R entry points for ArrowTabular, Dataset, and arrow_dplyr_query, then read the existing head() implementation and the Take() usage mentioned in the issue. The issue is done when the resoped slice() method works for those three object types and the relevant R behavior is covered by the project's existing checks.
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
- 35/100