rbindSQLDataFrame: rbind of 'SQLDataFrame' objects

Description Usage Arguments Details Value Examples

Description

Performs rbind on SQLDataFrame objects.

Usage

1
2
## S4 method for signature 'SQLDataFrame'
rbind(..., deparse.level = 1)

Arguments

...

One or more SQLDataFrame objects. These can be given as named arguments.

deparse.level

See ‘?base::cbind’ for a description of this argument.

Details

rbind supports aggregation of SQLDataFrame objects. For representation of SQLite tables, same or different connections are supported. For representation of MySQL tables, at least one SQLDataFrame must have write permission.

Value

A SQLDataFrame object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
test.db1 <- system.file("extdata/test.db", package = "SQLDataFrame")
test.db2 <- system.file("extdata/test1.db", package = "SQLDataFrame")
con1 <- DBI::dbConnect(DBI::dbDriver("SQLite"), dbname = test.db1)
con2 <- DBI::dbConnect(DBI::dbDriver("SQLite"), dbname = test.db2)
obj1 <- SQLDataFrame(conn = con1,
                     dbtable = "state",
                     dbkey = c("region", "population"))
obj2 <- SQLDataFrame(conn = con2,
                     dbtable = "state1",
                     dbkey = c("region", "population"))
obj1_sub <- obj1[1:10, 2:3]
obj2_sub <- obj2[8:15,2:3]

## rbind
res_rbind <- rbind(obj1_sub, obj2_sub)
res_rbind
dim(res_rbind)

SQLDataFrame documentation built on Nov. 29, 2020, 2:01 a.m.