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

Description Usage Arguments Value Note Author(s)

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

1
  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

Note

This method does not correct invalid names. That is, there is no test to determine whether the submitted name is valid.

Author(s)

Matt Owen mowen@iq.harvard.edu


IQSS/Zelig4 documentation built on May 9, 2019, 9:13 a.m.