Closed
Description
The dplyr::n()
notation suggested in https://github.com/tidyverse/dplyr/blob/master/NEWS.md#breaking-changes does not work on database handles.
packageVersion("dplyr")
#> [1] '0.7.8'
# works
dplyr::summarize(data.frame(x = 1), count = dplyr::n())
#> count
#> 1 1
# fails
db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
t <- dplyr::copy_to(db, data.frame(x = 1), "d")
dplyr::summarize(t, count = dplyr::n())
#> Error: This function should not be called directly
Created on 2018-12-31 by the reprex package (v0.2.1)
See also tidyverse/dplyr#4062 .