.BG
.FN get
.FN exists
.TL
Find an Object
.CS
get(name, where, frame, mode)
exists(name, where, frame, mode)
.AG name
character string giving the name of the object.
.AG where
which directory should the object come from?
If `where' is supplied, it can either be a number or a character string.
A number implies the corresponding element of the search list, so
`where=2', for example, gets an object from the second directory (typically
the system function directory).
If `where' is a character string, this is taken as the path name for a
directory in the file system.
In this case, the directory need not be on the search list.
Use of `get' with a path name is a more efficient way to get a few objects
from a known directory than using `attach'.
.AG frame
which of the current frames in the evaluation should be searched?
Frame 0 is a legal argument, meaning to look in the session frame, which contains
those objects created by `assign()' with `frame=0'.
If both `where' and `frame' are omitted, the search
is done as if `name'
were an ordinary name in an expression.
That is, the search is first in the local data frame, then
in frame 1, then the session
frame, and then in each of the permanent directories in the search list.
It is an error to supply both `where' and `frame'.
.AG mode
character string giving the mode wanted for the object.
By default, argument `mode' is `"any"', meaning that any mode is acceptable.
.RT
In the case of `get', the object
is returned, if found subject to the constraints implied by arguments
`mode', `where', or `frame'.
Failure to find the object causes an error.
.PP
`exists' returns `TRUE' or `FALSE' according
to whether the search succeeds.
.PP
Finding an object with `exists'
that fails the `mode' test produces a warning message
if the search otherwise succeeds.
Finding a file `name' that does not contain an S object
produces a warning message and returns `FALSE'.
.EX
get("[[") # get an object of a non-standard name
get("abc",mode="function") # get abc, but only if it is a function
joe.x <- get("x",w="/usr/joe/.Data") # get joe's version of x
if(!exists("my.init",frame=0)) # look only in session frame
        do.initialize()
.SA
`assign', `remove', `ls'.
.KW data
.WR
