I am trying to find out what additional arguments can be passed to dplyr::collect
in the ellipsis ...
. I want to do this because I believe that the
As noted by Chrisss and Zheyuan Li:
methods
indicates that each of these methods are not exported from the dplyr
namespace.?dplyr:::collect.tbl_sql
In 0.4.3
by examining tbl-sqr.r
file in the source code:
collect.tbl_sql <- function(x, ...) {
grouped_df(x$query$fetch(), groups(x))
}
and in 0.5
:
> dplyr:::collect.tbl_sql
function (x, ..., n = 1e+05, warn_incomplete = TRUE)
{
assert_that(length(n) == 1, n > 0L)
if (n == Inf) {
n <- -1
}
sql <- sql_render(x)
res <- dbSendQuery(x$src$con, sql)
on.exit(dbClearResult(res))
out <- dbFetch(res, n)
if (warn_incomplete) {
res_warn_incomplete(res, "n = Inf")
}
grouped_df(out, groups(x))
}
Thus, we can conclude that the behaviour of collect
has indeed changed in the manner originally described in my question.