Learn R Programming

replyr (version 0.8.2)

replyr_union_all: Union two tables.

Description

Spark 2* union_all has issues ( https://github.com/WinVector/replyr/blob/master/issues/UnionIssue.md ), and exponsed union_all semantics differ from data-source backend to backend. This is an attempt to provide a join-based replacement.

Usage

replyr_union_all(tabA, tabB, ..., useDplyrLocal = TRUE,
  useSparkRbind = TRUE,
  tempNameGenerator = makeTempNameGenerator("replyr_union_all"))

Arguments

tabA

not-NULL table with at least 1 row.

tabB

not-NULL table with at least 1 row on same data source as tabA and commmon columns.

...

force later arguments to be bound by name.

useDplyrLocal

logical if TRUE use dplyr::bind_rows for local data.

useSparkRbind

logical if TRUE try to use rbind on Sparklyr data

tempNameGenerator

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

Value

table with all rows of tabA and tabB (union_all).

Examples

Run this code
# NOT RUN {
d1 <- data.frame(x = c('a','b'), y = 1, stringsAsFactors= FALSE)
d2 <- data.frame(x = 'c', z = 1, stringsAsFactors= FALSE)
replyr_union_all(d1, d2, useDplyrLocal= FALSE)

# }

Run the code above in your browser using DataLab