barchart.table            package:lattice            R Documentation

_t_a_b_l_e _m_e_t_h_o_d_s _f_o_r _b_a_r_c_h_a_r_t _a_n_d _d_o_t_p_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     Contingency tables are often displayed using barcharts and
     dotplots. These methods are provided for convenience and operate
     directly on tables.  Arrays and matrices are simply coerced to be
     a table.

_U_s_a_g_e:

     ## S3 method for class 'table':
     barchart(x, data = NULL, groups = TRUE,
              origin = 0, stack = TRUE, ...)

     ## S3 method for class 'array':
     barchart(x, ...)

     ## S3 method for class 'matrix':
     barchart(x, ...)

     ## S3 method for class 'table':
     dotplot(x, data = NULL, groups = TRUE, ...)

     ## S3 method for class 'array':
     dotplot(x, ...)

     ## S3 method for class 'matrix':
     dotplot(x, ...)

_A_r_g_u_m_e_n_t_s:

       x: a 'table', 'array' or 'matrix' object. 

    data: should not be specified. If specified, will be ignored with a
          warning. 

  groups: logical, whether to use the last dimension as the grouping
          variable in the display. 

origin, stack: arguments to 'panel.barchart' controlling the display. 
          The defaults for the 'table' method are diffrent. 

     ...: other arguments, passed to the underlying 'formula' method. 

_D_e_t_a_i_l_s:

     The first dimension is used as the variable on the vertical axis. 
     The last dimension is optionally used as a grouping variable (to
     produce stacked barcharts by default).  All other dimensions are
     used as conditioning variables.  The order of these variables
     cannot be altered (except by permuting the original argument using
     't' or 'aperm').  For more flexibility, use the formula method
     after converting the table to a data frame using the relevant
     'as.data.frame' method.

_V_a_l_u_e:

     An object of class '"trellis"'. The 'update' method can be used to
     update components of the object and the 'print' method (usually
     called by default) will plot it on an appropriate plotting device.

_A_u_t_h_o_r(_s):

     Deepayan Sarkar Deepayan.Sarkar@R-project.org

_S_e_e _A_l_s_o:

     'barchart', 't', 'aperm', 'table', 'panel.barchart', 'Lattice'

_E_x_a_m_p_l_e_s:

     barchart(Titanic, scales = list(x = "free"),
              auto.key = list(title = "Survived"))

