dumpEnv: Dump Environment

View source: R/dump.R

dumpEnvR Documentation

Dump Environment

Description

Dump an enviroment to a filehash database

Usage

dumpEnv(env, dbName)

dumpImage(dbName = "Rworkspace", type = NULL)

dumpObjects(
  ...,
  list = character(0),
  dbName,
  type = NULL,
  envir = parent.frame()
)

dumpDF(data, dbName = NULL, type = NULL)

dumpList(data, dbName = NULL, type = NULL)

Arguments

env

an environment

dbName

character, name of the filehash database

type

type of filehash database to create

...

R objects to be dumped to a filehash database

list,

character vector of object names to be dumped

envir

environment from which objects are dumped

data

a data frame

Details

The dumpEnv function takes an environment and stores each element of the environment in a filehash database. Objects dumped to a database can later be loaded via dbLoad or can be accessed with dbFetch, dbList, etc. 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. dumpList works in a simlar way.

Value

An object of class "filehash" is returned and a database is created.

Functions

  • dumpImage(): Dump the Global Environment (analogous to save.image)

  • dumpObjects(): Dump named objects to a filehash database (analogous to save)

  • dumpDF(): Dump data frame columns to a filehash database

  • dumpList(): Dump elements of a list to a filehash database


filehash documentation built on Feb. 16, 2023, 7:51 p.m.