LG_load: Load an object into an environment

View source: R/LG_load.R

LG_loadR Documentation

Load an object into an environment

Description

This internal function loads the content of a file into an environment, and it gives it the name specified in the .name-argument. It is required that the file only contains one single object.

Usage

LG_load(.file, .env = parent.frame(), .name = NULL, .attributes_extra = NULL)

Arguments

.file

The path to the file to be loaded. An error will be returned if more than one object is contained in .file.

.env

The environment, default parent.frame(), where the result should be added under the name given to the argument .name.

.name

A character-string giving the name to be used for the object loaded from .file. The default value NULL will trigger the original name of the loaded object, i.e. the name it was saved under in .file.

.attributes_extra

A list containing additional attributes to be added to the loaded object. The default value NULL will skip this part.

Value

An object named .name will be added from .file to .env, with the possible extension of attributes as given by .attributes_extra.


LAJordanger/localgaussSpec documentation built on May 6, 2023, 4:31 a.m.