Learn R Programming

Zelig (version 4.2-1)

store.object: Store Object in Environment with a Fake Name

Description

This function takes the value of an object and stores it within a specified environment. This is similar to simply using the assign function, but will not overwrite existing values in the specified environment. It accomplishes this by appending a prefix to the name of the variable until the name becomes unique.

Usage

store.object(obj, envir, name = NULL, prefix = ".")

Arguments

obj
any object
envir
an environment object, which will contain the object with the assigned name
name
a character-string specifying the name that the object will be stored as in the specified environment
prefix
a character string specifying the prefixes to append to names that already have matches in the destination environment

Value

  • a character-string specifying the name of the object in the destination environment