getObj: Get a saved object from an RData file

View source: R/getObj_saveObj.R

getObjR Documentation

Get a saved object from an RData file

Description

Function to get a saved object from an RData file.

Usage

getObj(fn, obj_name = NULL)

Arguments

fn
  • filename from which to extract R object

obj_name
  • optional name (as 1-element character vector) of object to get

Details

The RData file may contain multiple R objects, but the function will return only a single object. The RData file is "loaded" into a new environment. If obj_name is not NULL, then the object with that name is returned. Otherwise, a vector of object names is obtained using ls() and the object corresponding to the first name in the list is returned.

Value

an R object


wStockhausen/wtsUtilities documentation built on Feb. 3, 2025, 6:29 a.m.