character, name of database to which objects should be dumped
envir
environment from which to obtain objects
data
a data frame
Value
An object of class "filehash" is returned.
Details
Objects dumped to a database can later be loaded via dbLoad.
Alternatively, the with method can be used to evaluate code in
the context of a database. If a database with name dbName
already exists, objects will be inserted into the existing database
(and values for already-existing keys will be overwritten).
dumpDF is different in that each variable in the data frame is
stored as a separate object in the database. So each variable can be
read from the database separately rather than having to load the
entire data frame into memory.
data <- data.frame(y = rnorm(100), x = rnorm(100), z = rnorm(100))
db <- dumpDF(data, dbName = "dataframe.dump")
fit <- with(db, lm(y ~ x + z))
summary(fit)