oneOrDataset          package:compositions          R Documentation

_T_r_e_a_t_i_n_g _s_i_n_g_l_e _c_o_m_p_o_s_i_t_i_o_n_s _a_s _o_n_e-_r_o_w _d_a_t_a_s_e_t_s

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

     A dataset is converted to a data matrix. A single data item (i.e.
     a simple vector) is converted to a one-row data matrix.

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

               oneOrDataset(W,B=NULL)
               

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

       W: a vector, matrix or dataframe

       B: an optional second vector, matrix or data frame having the
          intended number of rows.

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

     A data matrix containing the same data as W. If W is a vector it
     is interpreded as a single row. If 'B' is given and
     'length(dim(B))!= 2' and 'W' is a vector, then 'W' is repeated
     'nrow(B)' times.

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

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

     oneOrDataset(c(1,2,3))
     oneOrDataset(c(1,2,3),matrix(1:12,nrow=4))
     oneOrDataset(data.frame(matrix(1:12,nrow=4)))

