Description Usage Arguments Value Examples
Bind a list of items by rows (can't use dplyr::bind_rows or dplyr::combine on remote sources). Columns are intersected.
1 2 3 4 5 6 7 8 | replyr_bind_rows(
lst,
...,
useDplyrLocal = TRUE,
useSparkRbind = TRUE,
useUnionALL = TRUE,
tempNameGenerator = mk_tmp_name_source("replyr_bind_rows")
)
|
lst |
list of items to combine, must be all in same dplyr data service |
... |
force other arguments to be used by name |
useDplyrLocal |
logical if TRUE use dplyr for local data. |
useSparkRbind |
logical if TRUE try to use rbind on Sparklyr data |
useUnionALL |
logical if TRUE try to use union all binding |
tempNameGenerator |
temp name generator produced by wrapr::mk_tmp_name_source, used to record dplyr::compute() effects. |
single data item
1 2 3 4 5 6 7 8 9 10 11 | if (requireNamespace("RSQLite", quietly = TRUE)) {
my_db <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
# my_db <- sparklyr::spark_connect(master = "local")
d <- replyr_copy_to(my_db, data.frame(x = 1:2), 'd',
temporary = TRUE)
# dplyr::bind_rows(list(d, d))
# # Argument 1 must be a data frame or a named atomic vector,
# # not a tbl_dbi/tbl_sql/tbl_lazy/tbl
print(replyr_bind_rows(list(d, d)))
DBI::dbDisconnect(my_db)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.