compute

0th

Percentile

Compute a lazy tbl.

compute forces computation of lazy tbls, leaving data in the remote source. collect also forces computation, but will bring data back into an R data.frame (stored in a tbl_df). collapse doesn't force computation, but collapses a complex tbl into a form that additional restrictions can be placed on.

Usage
compute(x, name = random_table_name(), ...)

collect(x, ...)

collapse(x, ...)

Arguments
x
a data tbl
name
name of temporary table on database.
...
other arguments passed on to methods
Grouping

compute and collect preserve grouping, collapse drops it.

See Also

copy_to which is the conceptual opposite: it takes a local data frame and makes it available to the remote source.

Aliases
  • collapse
  • collect
  • compute
Examples
if (require("RSQLite") && has_lahman("sqlite")) {
batting <- tbl(lahman_sqlite(), "Batting")
remote <- select(filter(batting, yearID > 2010 && stint == 1), playerID:H)
remote2 <- collapse(remote)
cached <- compute(remote)
local  <- collect(remote)
}

Documentation reproduced from package dplyr, version 0.1.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.