getAnywhere              package:utils              R Documentation

Retrieve an R Object, Including from a Namespace

Description:

     These functions locates all objects with name matching its
     argument, whether visible on the search path, registered as an S3
     method or in a namespace but not exported. 'getAnywhere()' returns
     the objects and 'argsAnywhere()' returns the arguments of any
     objects that are functions.

Usage:

     getAnywhere(x)
     argsAnywhere(x)

Arguments:

       x: a character string or name.

Details:

     The function looks at all loaded namespaces, whether or not they
     are associated with a package on the search list.

     Where functions are found as an S3 method, an attempt is made to
     find which namespace registered them.  This may not be correct,
     especially if a namespace is unloaded.

Value:

     For 'getAnywhere()' an object of class '"getAnywhere"'.  This is a
     list with components 

    name: the name searched for.

    objs: a list of objects found

   where: a character vector explaining where the object(s) were found

 visible: logical: is the object visible

    dups: logical: is the object identical to one earlier in the list.


     Normally the structure will be hidden by the 'print' method. There
     is a '[' method to extract one or more of the objects found.

     For 'argsAnywhere()' one or more argument lists as returned by
     'args'.

See Also:

     'get',  'getFromNamespace', 'args'

Examples:

     getAnywhere("format.dist")
     getAnywhere("simpleLoess") # not exported from stats
     argsAnywhere(format.dist)

