objNameToList           package:tkWidgets           R Documentation

_C_o_n_v_e_r_t _O_b_j_e_c_t _N_a_m_e_s _t_o _L_i_s_t _o_f _L_i_s_t_s _w_i_t_h (_n_a_m_e, _o_b_j_e_c_t) _P_a_i_r_s

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

     This function supports 'objectBrowser' by converting a vector of
     selected object names to a list of lists with object names and the
     corresponding objects.

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

     objNameToList(objNames, env)

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

objNames: character vector giving the names of objects.

     env: an R environment where R objects are stored

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

     Each list in the list that is going to be returned contains a name
     for the object and the real value of the object. If the object
     name is a package name, the contents of the package will be the
     value associated with the package name.

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

     A list of lists each with a 'name' and an 'obj' component.

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

     Jianhua (John) Zhang

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

     'objectBrowser'

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

     # Create two R objects
     obj1 <- c("aaa", "bbb", "ccc")
     env1 <- new.env(parent = baseenv())

     # Get a list containing the two objects
     nl <- objNameToList(c("obj1", "env1"), parent.frame())
     str(nl)

