x2u                 package:combinat                 R Documentation

_C_o_n_v_e_r_t _a_n _x-_e_n_c_o_d_e_d _s_i_m_p_l_e_x-_l_a_t_t_i_c_e _p_o_i_n_t _t_o _a _u-_e_n_c_o_d_e_d _s_i_m_p_l_e_x-_l_a_t_t_i_c_e _p_o_i_n_t

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

     Convert an x-encoded simplex-lattice point to a u-encoded
     simplex-lattice point  (equivalently,  "untabulate" bin counts)

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

     x2u(x, labels=seq(along = x))

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

       x: x:    A numeric vector.  x[i] is interpreted as the count in
          bin i.

  labels: A vector.  Interpreted as the bin labels;  default value is
          seq(along = x), which causes return of a u-encoded
          simplex-lattice point.  Other values of labels cause return
          of the result of subscripting labels with the u-encoded
          simplex-lattice point that would have been obtained if the
          default value of labels were used. 

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

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

     rep(labels, x), a vector of length sum(x).  If labels = seq(along
     = x) (the default),  value is the u-encoded translation of the
     simplex lattice point, x.  Equivalently,  value gives the bin
     numbers, in lexicographic order,  for the objects represented by
     the counts in x.  For other values of argument "labels", value
     gives the bin labels for the objects represented by the counts in
     x (equivalent to labels[x2u(x)]).

_R_e_f_e_r_e_n_c_e_s:

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

     tabulate, rep

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

