getAnywhere              package:utils              R Documentation

_R_e_t_r_i_e_v_e _a_n _R _O_b_j_e_c_t, _I_n_c_l_u_d_i_n_g _f_r_o_m _a _N_a_m_e_s_p_a_c_e

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     getAnywhere(x)
     argsAnywhere(x)

_A_r_g_u_m_e_n_t_s:

       x: a character string or name.

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     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'.

_S_e_e _A_l_s_o:

     'get',  'getFromNamespace', 'args'

_E_x_a_m_p_l_e_s:

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

