changeTemp              package:svMisc              R Documentation

_C_h_a_n_g_e _a_n _i_t_e_m _i_n _a _t_e_m_p_o_r_a_r_y _l_i_s_t _v_a_r_i_a_b_l_e

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

     The function changes an item in a list variable located in
     TempEnv, an environment dedicated to temporary variables
     (especially useful for GUIs).

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

     changeTemp(x, item, value, replace.existing = TRUE)

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

       x: The name of the variable containing the list 

    item: The item to change (or create) in the list 

   value: The value to put in the list item 

replace.existing: Do we replace an existing item? 

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

     Philippe Grosjean <phgrosjean@sciviews.org>

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

     'TempEnv', 'assignTemp', 'getTemp', 'existsTemp', 'rmTemp',
     'addTemp', 'tempvar'

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

     changeTemp("tst", "item1", 1:10)
     # Retrieve this variable
     getTemp("tst")
     # Create another item in the list
     changeTemp("tst", "item2", TRUE)
     getTemp("tst")
     # Change it
     changeTemp("tst", "item2", FALSE)
     getTemp("tst")
     # Delete it (= assign NULL to it)
     changeTemp("tst", "item2", NULL)
     getTemp("tst")
     # Delete the whole variable
     rmTemp("tst")

