apache / apache/arrow

[R] Add slice() method

Open
#29,395 8 comments 0 reactions 0 assignees View on GitHub
Component: R Type: task
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.