binmat            package:hyperdirichlet            R Documentation

_C_r_e_a_t_e _a _m_a_t_r_i_x _o_f _a_l_l _b_i_n_a_r_y _c_o_m_b_i_n_a_t_i_o_n_s

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

     Create a matrix of all binary combinations for use with the
     hyperdirichlet distribution

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

     binmat(n, alternatives = NULL, pnames=NULL)

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

       n: Number of binary digits

alternatives: The alternatives; prototypically 'TRUE' and 'FALSE', but
          default 'NULL', taken to mean '0' and '1', is easier on the
          eye

  pnames: Optional vector specifying the column names; default of
          'NULL' means to use 'p1','p2' etc

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

     Function 'binmat(n)' returns an integer matrix of zeros and ones
     with 2^n rows and n columns.  In binary, the rows count from 0 to
     2^n-1.

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

     Robin K. S. Hankin

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

     'print.hyperdirichlet'

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

     binmat(4)

     binmat(3,alternatives=c(TRUE,FALSE))

