get                   package:base                   R Documentation

_R_e_t_u_r_n _a _V_a_r_i_a_b_l_e'_s _V_a_l_u_e

_D_e_s_c_r_i_p_t_i_o_n:

     Search for an R object with a given name and return it if found.

_U_s_a_g_e:

     get(x, pos=-1, envir=pos.to.env(pos), mode="any", inherits=TRUE)

_A_r_g_u_m_e_n_t_s:

       x: a variable name (given as a quoted string).

     pos: position in search list, can be numerical or a quoted string.

   envir: the environment to be used.

    mode: the type of object sought.

inherits: should the enclosing frames of the environment be inspected?

_V_a_l_u_e:

     This function searches the specified environment for a bound
     variable whose name is given by the string `x'.  If the variable's
     value is not of the correct `mode', it is ignored.

     If `inherits' is `FALSE', only the first frame of the specified
     environment is inspected.  If `inherits' is `TRUE', the search is
     continued up through the parent frames until a bound value of the
     right mode is found.

     Using a `NULL' environment is equivalent to using the current
     environment.

_W_a_r_n_i_n_g:

     Up to and including this release `mode' is interpreted as the
     value of `typeof(x)'.  This will change from R 1.2.0 to the value
     of `mode(x)', for compatibility with S.

_S_e_e _A_l_s_o:

     `exists'.

_E_x_a_m_p_l_e_s:

     get("%o%")

