rdata-objects: Load, save, and remove .RData objects

Description Usage Arguments Details Value Author(s) See Also

Description

Wrapper functions to load, save, and unlink, permitting lists of objects to be loaded/saved/deleted all at once.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
loadObjects(
  objects,
  path = NULL,
  ext = ".RData",
  quiet = TRUE,
  envir = parent.frame()
)

saveObjects(
  objects,
  path = NULL,
  ext = ".RData",
  quiet = TRUE,
  envir = parent.frame()
)

rmObjects(objects, path = NULL, ext = ".RData", quiet = TRUE)

Arguments

objects

A character list or character vector of object names

path

The filepath to the directory in which to save or from which to load the objects. The path should be constructed using file.path.

ext

The file extension to use (default is .RData).

quiet

Logical. Should output be suppressed? Default is TRUE.

envir

The environment in which to look for and load objects (default: the environment from which the function was called).

Details

By default, the extension .RData is used.

Value

Invisibly if quiet=TRUE. Either a list of objects loaded, empty list if saved, or if removed either 0 for success, 1 for failure.

Author(s)

Alex Chubaty

See Also

file.path, load, save, unlink


achubaty/amc documentation built on April 6, 2021, 6:56 a.m.