getPackageName            package:methods            R Documentation

_T_h_e _N_a_m_e _a_s_s_o_c_i_a_t_e_d _w_i_t_h _a _G_i_v_e_n _P_a_c_k_a_g_e

_D_e_s_c_r_i_p_t_i_o_n:

     The functions below produce the package associated with a
     particular environment or position on the search list, or of the
     package containing a particular function.  They are primarily used
     to support computations that need to differentiate objects on
     multiple packages.

_U_s_a_g_e:

     getPackageName(where)

     packageSlot(object)
     packageSlot(object) <- value

_A_r_g_u_m_e_n_t_s:

   where: the environment or position on the search list associated
          with the desired package.

  object: object providing a character string name, plus the package in
          which this object is to be found.

   value: the name of the package.

_D_e_t_a_i_l_s:

     Package names are normally installed during loading of the
     package, by the INSTALL script or by the 'library' function. 
     (Currently, the name is stored as the object '.packageName' but
     don't trust this for the future.)

_V_a_l_u_e:

     'packageName' return the character-string name of the package
     (without the extraneous '"package:"' found in the search list).

     'packageSlot' returns or sets the package name slot (currently an
     attribute, not a formal slot, but this will likely change).

_S_e_e _A_l_s_o:

     'search'

_E_x_a_m_p_l_e_s:

     ## both the following usually return "base"
     getPackageName(length(search()))

