Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-18215 [R] User experience improvements
  3. ARROW-18199

[R] Misleading error message in query using across()

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • R
    • None

    Description

      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?

      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()
      
      Error in `across()`:
      ! Must be used inside dplyr verbs.
      Run `rlang::last_error()` to see where the error occurred.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            thisisnic Nicola Crane
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: