cols2Env package:AnnBuilder R Documentation _C_r_e_a_t_e_s _a _e_n_v_i_r_o_n_m_e_n_t _o_b_j_e_c_t _u_s_i_n_g _d_a_t_a _f_r_o_m _t_w_o _c_o_l_u_m_n_s _o_f _a _m_a_t_r_i_x _D_e_s_c_r_i_p_t_i_o_n: Given a matrix with two columns, this function creates an environment object with values in one of the specified columns as keys and those in the other column as values. _U_s_a_g_e: cols2Env(cols, colNames, keyColName = colNames[1], sep) matchAll(cols, keyColName) matchOneRow(cols, keyColName, sep = ";") _A_r_g_u_m_e_n_t_s: cols: `cols' a matrix with two columns colNames: `colNames' a charcter string for the name of the column whose values will be used for the keys of the environment object to be created keyColName: `keyColName' a character string for the name of the column whose values will be the corresponding values for keys of the environment object to be created sep: `sep' a character for the separaters used to separate entries that have multiple values _D_e_t_a_i_l_s: The matrix or matrix convertable object passed to cols2Env must have two coloumns with one intented to be used as the key and the other be the value. Cells in either or both columns may have multiple values separated by a separator (e.g. "a;b", "1;2;3") making the mapping between keys and the corresponding values not a straitforward operation. cols2Env gets all the unique values from the key column by spliting them and maps values to each of them. `cols2Env' calls `matchAll' that in turn calls `matchOneRow' to first split entries and then map entries in the two coloumns on one to one bases. Unique keys in the column defined as the key column will be assigned a vector containing all the values corresponding the keys in the environment to return. _V_a_l_u_e: This function returns an environment object with key and value pairs _N_o_t_e: This function is part of the Bioconductor project at Dana-Farber Cancer Institute to provide Bioinformatics functionalities through R _A_u_t_h_o_r(_s): Jianhua Zhang _S_e_e _A_l_s_o: `ABPkgBuilder' _E_x_a_m_p_l_e_s: dataM <- matrix(c("a;b", "1;2;3", "a;b", "4;5", "c", "6;7", "b;a", "6;7;8"), ncol = 2, byrow = TRUE) temp <- cols2Env(dataM, c("key", "value"), keyColName = "key") dataM multiget(ls(temp), temp)