Find the Database that Contains an Object

DESCRIPTION:

Returns a vector of names, or positions of databases and/or frames that contain an object.

USAGE:

find(what, mode="any", numeric.=F, whichFrames=0:1, ...) 

REQUIRED ARGUMENTS:

what
the name of an object. While this can be either a name or a character string, a character string is recommended for consistency with related functions such as findFunction.

OPTIONAL ARGUMENTS:

mode
a character string giving a mode for restricting the search.
numeric.
a logical flag. If numeric.=TRUE, the return value is numeric. Otherwise, the return value is character.
whichFrames
an integer vector indicating the frames in which to search. By default, the session (frame 0) and expression (frame 1) frames are searched. The whichFrames argument can also bet set to NULL, in which case S-PLUS suppresses searching in frames 0 and 1. This is appropriate, for example, when the result from find is given to the get or assign functions.
...
additional arguments are passed to the exists function.

VALUE:

If numeric.=FALSE, the return value is a character vector of names of frames and attached databases that contain what . If numeric.=TRUE , the return value is a numeric vector with positive integers for positions of databases in the search list that contain what; the vector contains negative integers for frame numbers. The names attribute of the databases corresponding to the returned integers gives the vector of database names.

SEE ALSO:

, , , , , , .

EXAMPLES:

find(sin) 
# [1] "main" 

find(sin, num=T) 
# main
#    7 

find("some strange name") 
# character(0)