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.

_D_e_t_a_i_l_s:

_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 Bras 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])

