You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nicola Crane (Jira)" <ji...@apache.org> on 2022/09/14 11:19:00 UTC

[jira] [Commented] (ARROW-17724) [R] Allow package name prefix inside dplyr::across's .fns argument

    [ https://issues.apache.org/jira/browse/ARROW-17724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17604024#comment-17604024 ] 

Nicola Crane commented on ARROW-17724:
--------------------------------------

Nicely spotted. This is due to {{is.name((fns))}} in the {{across_setup()}} function evaluating to {{TRUE}} for {{as.character}} and {{FALSE}} for {{base::as.character}}.  Adding {{is.call(fns)}} to the list of conditions for identifying single functions could work, or potentially replacing {{is.name(fns)}} with {{is.call(fns)}} or another function entirely.

> [R] Allow package name prefix inside dplyr::across's .fns argument
> ------------------------------------------------------------------
>
>                 Key: ARROW-17724
>                 URL: https://issues.apache.org/jira/browse/ARROW-17724
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 10.0.0
>            Reporter: SHIMA Tatsuya
>            Priority: Major
>
> This is not a major issue, but may be worth mentioning as a known limitation.
> {code:r}
> library(dplyr, warn.conflicts = FALSE)
> library(dplyr, warn.conflicts = FALSE)
> mtcars |> arrow::arrow_table() |> mutate(across(starts_with("c"), base::as.character)) |> collect()
> #> Error in base(cyl): could not find function "base"
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)