Description Usage Arguments Grouping See Also Examples
View source: R/compute-collect.r
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.
1 2 3 4 5 6 7 8 9  | 
x | 
 a data tbl  | 
name | 
 name of temporary table on database.  | 
... | 
 other arguments passed on to methods  | 
temporary | 
 if   | 
unique_indexes | 
 a list of character vectors. Each element of the list will create a new unique index over the specified column(s). Duplicate rows will result in failure.  | 
indexes | 
 a list of character vectors. Each element of the list will create a new index.  | 
compute and collect preserve grouping, collapse drops
it.
copy_to which is the conceptual opposite: it
takes a local data frame and makes it available to the remote source.
1 2 3 4 5 6 7  | 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)
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.