You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to summarize an arrow dataset in R using the n function from dplyr, but I noticed that it does not work when called via the dplyr::n syntax, even though it works fine just as n. I also tried the n_distinct function with the same issue
library(arrow)
#> #> Attaching package: 'arrow'#> The following object is masked from 'package:utils':#> #> timestamp
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, uniondir<-file.path(tempdir(), "test-data")
test_data<-data.frame(A=1:10)
write_dataset(test_data, dir)
1.Thisdoesworkdata2<-open_dataset(dir)%>%
summarise(N=n())
data2#> FileSystemDataset (query)#> N: int32#> #> See $.data for the source Arrow object
collect(data2)
#> # A tibble: 1 × 1#> N#> <int>#> 1 101.Butthisdoesnotworkdata1<-open_dataset(dir)%>%
summarise(N=dplyr::n())
#> Error: Error : Expression dplyr::n() not supported in Arrow#> Call collect() first to pull data into R.data1#> Error in eval(expr, envir, enclos): object 'data1' not found
Jonathan Keane / @jonkeane:
Thanks for the report! We don't currently support calling functions with the package namespace attached — though it is something we are thinking about + something we plan to support (see ARROW-14575 for some discussion and possible approaches). We don't have a timeline for this, but it helps knowing that someone is looking for it!
If you don't mind, I'm going to close this issue, but please to feel free to continue the discussion on ARROW-14575
I am trying to summarize an arrow dataset in R using the
n
function from dplyr, but I noticed that it does not work when called via thedplyr::n
syntax, even though it works fine just asn
. I also tried then_distinct
function with the same issueCreated on 2022-05-13 by the reprex package (v2.0.1)
Session info
Reporter: Sam Bashevkin
Related issues:
Note: This issue was originally created as ARROW-16577. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: