[
https://issues.apache.org/jira/browse/ARROW-13499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17392653#comment-17392653
]
Ian Cook edited comment on ARROW-13499 at 8/4/21, 2:31 AM:
-----------------------------------------------------------
I noticed another strange NSE behavior inside {{summarise()}}: if you pass
{{na.rm}} as shorthand {{T}} or {{F}} instead of {{TRUE}} or {{FALSE}}, you get
an error like this:
{code:java}
Error: Can't subset columns that don't exist.
x Column `T` doesn't exist.{code}
was (Author: icook):
I noticed another strange NSE behavior: if you pass {{na.rm}} as shorthand
{{T}} or {{F}} instead of {{TRUE}} or {{FALSE}}, you get an error like this:
{code:java}
Error: Can't subset columns that don't exist.
x Column `T` doesn't exist.{code}
> [R] Aggregation on expression doesn't NSE correctly
> ---------------------------------------------------
>
> Key: ARROW-13499
> URL: https://issues.apache.org/jira/browse/ARROW-13499
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Reporter: Neal Richardson
> Priority: Major
> Fix For: 6.0.0
>
>
> {code}
> expect_dplyr_equal(
> input %>%
> mutate(has_words = nchar(verses) < 0) %>%
> group_by(some_grouping) %>%
> summarize(all(has_words)) %>%
> arrange(some_grouping) %>%
> collect(),
> tbl
> )
> {code}
> works, but if you define the expression inline, it doesn't:
> {code}
> expect_dplyr_equal(
> input %>%
> group_by(some_grouping) %>%
> summarize(has_words = all(nchar(verses) < 0)) %>%
> arrange(some_grouping) %>%
> collect(),
> tbl
> )
> {code}
> The error you get I think means that {{base::nchar}} is being called. I'm not
> sure if this is a general issue with our nse_funcs calling other nse_funcs,
> or if this is about the way the aggregation function environment is
> constructed separately, but it's not good.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)