spacings                 package:vcd                 R Documentation

_S_p_a_c_i_n_g-_g_e_n_e_r_a_t_i_n_g _F_u_n_c_t_i_o_n_s

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

     These functions generate spacing functions to be used with
     'strucplot' to obtain customized spaces between the elements of a
     strucplot.

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

     spacing_equal(sp = unit(0.5, "lines"))
     spacing_dimequal(sp)
     spacing_increase(start = unit(0.3, "lines"), rate = 1.5)
     spacing_conditional(sp = unit(0.5, "lines"), start = unit(2, "lines"), rate = 1.8)
     spacing_highlighting(start = unit(0.2, "lines"), rate = 1.5)

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

   start: object of class '"unit"' indicating the start value for
          increasing spacings.

    rate: increase rate for spacings.

      sp: object of class '"unit"' specifying a fixed spacing.

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

     These generating functions return a function used by 'strucplot'
     to generate appropriate spaces between tiles of a strucplot, using
     the 'dimnames' information of the visualized table.

     'spacing_equal' allows to specify one fixed space for _all_
     dimensions.

     'spacing_dimequal' allows to specify a fixed space for _each_
     dimension.

     'spacing_increase' creates increasing spaces for all dimensions,
     based on a starting value and an increase rate.

     'spacing_conditional' combines 'spacing_equal' and
     'spacing_increase' to create fixed spaces for conditioned
     dimensions, and increasing spaces for conditioning dimensions.

     'spacing_highlighting' is essentially 'spacing_conditional' but
     with the space of the last dimension set to 0. With a
     corresponding color scheme, this gives the impression of the last
     class being 'highlighted' in the penultimate class (as, e.g., in
     'doubledecker' plots).

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

     A spacing function with arguments: 

       d: '"dim"' attribute of a contingency table.

condvars: index vector of conditioning dimensions (currently only used
          by 'spacing_conditional').

     This function computes a list of objects of class '"unit"'. Each
     list element contains the spacing information for the
     corresponding dimension of the table.  The length of the '"unit"'
     objects is k-1, k number of levels of the corresponding factor.

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

     David Meyer David.Meyer@R-project.org

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

     'strucplot', 'doubledecker'

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

     strucplot(Titanic, spacing = spacing_increase(start = 0.5, rate = 1.5))
     strucplot(Titanic, spacing = spacing_equal(1))
     strucplot(Titanic, spacing = spacing_dimequal(1:4 / 4))
     strucplot(Titanic, spacing = spacing_highlighting,
                        gp = gpar(fill = c("light gray","dark gray")))
     data(PreSex)
     strucplot(aperm(PreSex, c(1,4,2,3)), spacing = spacing_conditional,
               condvars = 2)  

