Learn R Programming

dplyr (version 1.0.10)

compute: Force computation of a database query

Description

compute() stores results in a remote temporary table. collect() retrieves data into a local tibble. collapse() is slightly different: it doesn't force computation, but instead forces generation of the SQL query. This is sometimes needed to work around bugs in dplyr's SQL generation.

All functions preserve grouping and ordering.

Usage

compute(x, ...)

collect(x, ...)

collapse(x, ...)

Arguments

x

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.

...

Arguments passed on to methods

Methods

These functions are generics, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour.

Methods available in currently loaded packages:

  • compute(): dplyr:::methods_rd("compute")

  • collect(): dplyr:::methods_rd("collect")

  • collapse(): dplyr:::methods_rd("collapse")

See Also

copy_to(), the opposite of collect(): it takes a local data frame and uploads it to the remote source.