sqlMerge: Olito's SQLite Merge for large files

View source: R/sqlMerge.R

sqlMergeR Documentation

Olito's SQLite Merge for large files

Description

Merge implementation in SQLite for dealing with memory issues when normal merge functions get out of RAM

Usage

sqlMerge(x = NULL, y = NULL, by = NULL, drop = TRUE, replace = FALSE)

Arguments

x

Xdf data.frame class

y

Ydf data.frame class

by

Key variable, same type and name accross Xdf and Ydf

drop

Logical for remove original Xdf and Ydf

replace

Logical ovewrite an existing db file

Value

data.table object

Examples

# library(RSQLite)
# library(DBI)
# library(glue)
# library(data.table)
# temp <- mtcars
# temp$id <- row.names(temp)
# row.names(temp) <- NULL
# yDF <- temp[1:26, c(12, 1:5)]
# xDF <- temp[7:32, c(12, 6:11)]
# sqlMerge(xDF, yDF, by = 'id', replace = TRUE)

olitroski/olibrary documentation built on Oct. 20, 2022, 2:42 p.m.