loadObjs: Version of 'load' that returns the unserialized objects as a...

View source: R/loadObjs.R

loadObjsR Documentation

Version of load that returns the unserialized objects as a list

Description

This is an alternative to load which does not unserialize the objects into an environment, typically the user's global environment, and overwrite existing variables. Instead, it returns the unserialized objects as a named list.

Usage

loadObjs(file, ...)

Arguments

file

the RDA file or connection

...

additional arguments passed to as.list.environment

Details

This uses load to unserialize the objects in the RDA stream into an empty environment and then converts that to a list and returns that.

Value

A list with named-elements

Author(s)

Duncan Temple Lang

See Also

load and Load

Examples

  f = system.file("sampleRDA", "test.rda", package = "RDAInfo")
  cur = ls()
  vals = loadObjs(f)
  now = ls()
  setdiff(now, cur)
  names(vals)

duncantl/RDAInfo documentation built on Aug. 10, 2024, 3:17 p.m.