copyEnv               package:Biobase               R Documentation

_L_i_s_t-_E_n_v_i_r_o_n_m_e_n_t _i_n_t_e_r_a_c_t_i_o_n_s

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

     These functions can be used to make copies of environments, or to
     get/assign all of the objects inside of an environment.

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

     copyEnv(oldEnv, newEnv = new.env(hash=TRUE, parent =
     parent.env(oldEnv)), all.names=FALSE)
     listLen(list)
     l2e(vals, envir)

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

  oldEnv: An environment to copy from

  newEnv: An environment to copy to.  Default is a new environment with
          the same parent environment as oldEnv.

   envir: An environment to get/set values to

    vals: A named list of objects to assign into an environment

all.names: Whether to retrieve objects with names that start with a
          dot.

    list: A list

_D_e_t_a_i_l_s:

     'listLen':  This function returns a vector of the same lenght as
     the list containng the lengths of each element of the supplied
     argument. 'l2e':  This function takes a named list and assigns all
     of its elements into the environment (using the names to name the
     objects). 'copyEnv':  This function will make a copy of the
     contents from 'oldEnv' and place them into 'newEnv'.

_A_u_t_h_o_r(_s):

     Jeff Gentry and R. Gentleman

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

     'environment', 'as.list'

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

        z <- new.env()
        multiassign(c("a","b","c"),c(1,2,3),z)

        a <- copyEnv(z)
        ls(a)

        q <- as.list(z)
        g <- new.env()
        g <- l2e(q,g)
        ls(g)

