collapse.tbl_sql | R Documentation |
These are methods for the dplyr generics collapse()
, compute()
,
and collect()
. collapse()
creates a subquery, compute()
stores
the results in a remote table, and collect()
executes the query and
downloads the data into R.
## S3 method for class 'tbl_sql'
collapse(x, ...)
## S3 method for class 'tbl_sql'
compute(
x,
name = NULL,
temporary = TRUE,
unique_indexes = list(),
indexes = list(),
analyze = TRUE,
...,
cte = FALSE
)
## S3 method for class 'tbl_sql'
collect(x, ..., n = Inf, warn_incomplete = TRUE, cte = FALSE)
x |
A lazy data frame backed by a database query. |
... |
other parameters passed to methods. |
name |
Table name in remote database. |
temporary |
Should the table be temporary ( |
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. |
analyze |
if |
cte |
|
n |
Number of rows to fetch. Defaults to |
warn_incomplete |
Warn if |
library(dplyr, warn.conflicts = FALSE)
db <- memdb_frame(a = c(3, 4, 1, 2), b = c(5, 1, 2, NA))
db %>% filter(a <= 2) %>% collect()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.