detach                 package:base                 R Documentation

_D_e_t_a_c_h _O_b_j_e_c_t_s _f_r_o_m _t_h_e _S_e_a_r_c_h _P_a_t_h

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

     Detach a database, i.e., remove it from the `search()' patch of
     available R objects. Usually, this either a `data.frame' which has
     been `attach'ed or a package which was required previously.

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

     detach(name, pos = 2)

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

    name: The object to detach.  Defaults to `search()[pos]'. This can
          be a name or a character string but not a character vector.

     pos: Index position in `search()' of database to detach.  When
          `name' is `numeric', `pos = name' is used.

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

     The attached database is returned invisibly, either as
     `data.frame' or as `list'.

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

     `attach', `library', `search', `objects'.

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

     require(eda)#package
     detach(package:eda)
     ## could equally well use detach("package:eda")
     ## but NOT  pkg <- "package:eda"; detach(pkg)
     library(mva)
     detach(2)# `pos' used for `name'

