apache / apache/arrow

[R] New column name wrongly set when using mutate with if_any

Open
#34,860 1 comment 0 reactions 1 assignee Claimed by @thisisnic View on GitHub
Component: R good-second-issue Priority: Critical Type: bug
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.

The code below generates the following not expected error message:

! Can't subset columns that don't exist.
✖ Column `new_var` doesn't exist.

```R
data <- iris %>% arrow::record_batch()
data %>% mutate(new_var = if_any(ends_with("Width"), ~ . > 4)) %>% select(new_var)
```

We expect that a new column is created with `new_var` as name.

### Component(s)

R

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.