oneRowPerId             package:cellHTS             R Documentation

_R_e_a_r_r_a_n_g_e _d_a_t_a_f_r_a_m_e _e_n_t_r_i_e_s _s_u_c_h _t_h_a_t _t_h_e_r_e _i_s _e_x_a_c_t_l_y _o_n_e _r_o_w
_p_e_r _I_D.

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

     Rearrange dataframe entries such that there is exactly one row per
     ID. The IDs are taken from the argument 'ids' and are matched
     against the first column of 'x'. If an ID is missing in 'x[,1]', a
     row with 'NA' values is inserted. If an ID occurs multiple times
     in 'x[,1]', rows are collapsed into characters of comma-separated
     values.

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

     oneRowPerId(x, ids)

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

       x: dataframe.

     ids: character vector.

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

     A dataframe whose rows correspond 1:1 to 'ids'.

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

     W. Huber huber@ebi.ac.uk, Ligia Pedroso Braz ligia@ebi.ac.uk

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

         x = data.frame(ids=I(c("a", "a", "c")), val=11:13)
         oneRowPerId(x, letters[1:3])

