joinSQLDataFrame: join 'SQLDataFrame' together

Description Usage Arguments Value Examples

Description

*_join functions for SQLDataFrame objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## S3 method for class 'SQLDataFrame'
left_join(x, y, by = NULL, suffix = c(".x",
  ".y"), ...)

## S3 method for class 'SQLDataFrame'
inner_join(x, y, by = NULL, suffix = c(".x",
  ".y"), ...)

## S3 method for class 'SQLDataFrame'
semi_join(x, y, by = NULL, suffix = c(".x",
  ".y"), ...)

## S3 method for class 'SQLDataFrame'
anti_join(x, y, by = NULL, suffix = c(".x",
  ".y"), ...)

Arguments

x

SQLDataFrame objects to join.

y

SQLDataFrame objects to join.

by

A character vector of variables to join by. If ‘NULL’, the default, ‘*_join()’ will do a natural join, using all variables with common names across the two tables. See ?dplyr::join for details.

suffix

A character vector of length 2 specify the suffixes to be added if there are non-joined duplicate variables in ‘x’ and ‘y’. Default values are ".x" and ".y".See ?dplyr::join for details.

Value

A SQLDataFrame object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
obj1 <- SQLDataFrame(dbname = "inst/extdata/test.db",
                     dbtable = "state",
                     dbkey = c("region", "population"))
obj2 <- SQLDataFrame(dbname = "inst/extdata/test1.db",
                     dbtable = "state1",
                     dbkey = c("region", "population"))

obj1_sub <- obj1[1:10, 1:2]
obj2_sub <- obj2[8:15, 2:3]

left_join(obj1_sub, obj2_sub)
inner_join(obj1_sub, obj2_sub)
semi_join(obj1_sub, obj2_sub)
anti_join(obj1_sub, obj2_sub)

Liubuntu/SQLDataFrame documentation built on May 17, 2019, 7:43 a.m.