equalBins               package:Hmisc               R Documentation

_M_u_l_t_i_c_o_l_u_m_n _F_o_r_m_a_t_i_n_g

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

     Expands the width either supercolumns or the subcolumns so that
     the the sum of the supercolumn widths is the same as the sum of
     the subcolumn widths.

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

     equalBins(widths, subwidths)

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

  widths: widths of the supercolumns.

subwidths: list of widths of the subcolumns for each supercolumn.

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

     This determins the correct subwidths of each of various columns in
     a table for printing.  The correct width of the multicolumns is
     deterimed by summing the widths of it subcolumns.

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

     widths of the the columns for a table.

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

     Charles Dupont

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

     'nchar', 'stringDims'

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

     mcols <- c("Group 1", "Group 2")
     mwidth <- nchar(mcols, type="width")
     spancols <- c(3,3)
     ccols <- c("a", "deer", "ad", "cat", "help", "bob")
     cwidth <- nchar(ccols, type="width")

     subwidths <- partition.vector(cwidth, spancols)

     equalBins(mwidth, subwidths)

