multiassign             package:Biobase             R Documentation

_A_s_s_i_g_n _V_a_l_u_e_s _t_o _a _N_a_m_e_s

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

     Assign values to names in an environment.

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

     multiassign(x, value, envir = parent.frame(), inherits=FALSE)

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

       x: A vector or list of names, represented by strings.

   value: a vector or list of values to be assigned.

   envir: the 'environment' to use. See the details section.

inherits: should the enclosing frames of the environment be inspected?

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

     The 'pos' argument can specify the  environment in which to assign
     the object in any of several ways: as an integer (the position in
     the 'search' list); as the character string name of an element in
     the search list; or as an 'environment' (including using
     'sys.frame' to access the currently active function calls). The
     'envir' argument is an alternative way to specify an environment,
     but is primarily there for back compatibility.

     If 'value' is missing and 'x' has names then the values in each
     element of 'x' are assigned to the names of 'x'.

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

     This function is invoked for its side effect, which is assigning
     the 'values' to the variables in 'x'.  If no 'envir' is specified,
     then the assignment takes place in the currently active
     environment.

     If 'inherits' is 'TRUE', enclosing environments of the supplied
     environment are searched until the variable 'x' is encountered.
     The value is then assigned in the environment in which the
     variable is encountered.  If the symbol is not encountered then
     assignment takes place in the user's workspace (the global
     environment).

     If 'inherits' is 'FALSE', assignment takes place in the initial
     frame of 'envir'.

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

     'multiget'

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

     #-- Create objects  'r1', 'r2', ... 'r6' --
     nam <- paste("r",1:6, sep=".")

     multiassign(nam, 11:16)
     ls(pat="^r..$")

     #assign the values in y to variables with the names from y

     y<-list(a=4,d=mean,c="aaa")
     multiassign(y)

