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/10/31 13:54:00 UTC

[jira] [Created] (ARROW-18199) [R] Misleading error message in query using across()

Nicola Crane created ARROW-18199:
------------------------------------

             Summary: [R] Misleading error message in query using across()
                 Key: ARROW-18199
                 URL: https://issues.apache.org/jira/browse/ARROW-18199
             Project: Apache Arrow
          Issue Type: Bug
          Components: R
            Reporter: Nicola Crane


Error handling looks like it's happening in the wrong place - a comma has been missed in the {{select()}} but it's wrongly appearing like it's an issue with {{across()}}.  Can we do something to make this not happen?

{code:r}
download.file(
  url = "https://github.com/djnavarro/arrow-user2022/releases/download/v0.1/nyc-taxi-tiny.zip",
  destfile = here::here("data/nyc-taxi-tiny.zip")
)

library(arrow)
library(dplyr)

open_dataset("data") %>%
  select(pickup_datetime, pickup_longitude, pickup_latitude ends_with("amount")) %>%
  mutate(across(ends_with("amount"), ~.x * 0.87, .names = "{.col}_gbp")) %>%
  collect()
{code}


{code:r}
Error in `across()`:
! Must be used inside dplyr verbs.
Run `rlang::last_error()` to see where the error occurred.
{code}





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