Learn R Programming

replyr (version 0.9.1)

replyr_bind_rows: Bind a list of items by rows (can't use dplyr::bind_rows or dplyr::combine on remote sources). Columns are intersected.

Description

Can't set eagerTempRemoval=TRUE on platforms that don't correctly implement dplyr::compute (for instance Sparklyr prior to full resolution of https://github.com/rstudio/sparklyr/issues/721).

Usage

replyr_bind_rows(lst, ..., useDplyrLocal = TRUE, useSparkRbind = TRUE,
  useUnionALL = TRUE, eagerTempRemoval = FALSE,
  tempNameGenerator = makeTempNameGenerator("replyr_bind_rows"))

Arguments

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

eagerTempRemoval

logical if TRUE remove temps early.

tempNameGenerator

temp name generator produced by cdata::makeTempNameGenerator, used to record dplyr::compute() effects.

Value

single data item

Examples

Run this code
# NOT RUN {

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
replyr_bind_rows(list(d, d))

# }

Run the code above in your browser using DataLab