Description Usage Arguments Details Value Author(s) See Also Examples

Contingency tables are often displayed using bar charts and dot plots. These methods operate directly on tables, bypassing the need to convert them to data frames for use with the formula interface. Matrices and arrays are also supported, by coercing them to tables.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
## S3 method for class 'table'
barchart(x, data, groups = TRUE,
origin = 0, stack = TRUE, ..., horizontal = TRUE)
## S3 method for class 'array'
barchart(x, data, ...)
## S3 method for class 'matrix'
barchart(x, data, ...)
## S3 method for class 'table'
dotplot(x, data, groups = TRUE, ..., horizontal = TRUE)
## S3 method for class 'array'
dotplot(x, data, ...)
## S3 method for class 'matrix'
dotplot(x, data, ...)
``` |

`x` |
A |

`data` |
Should not be specified. If specified, will be ignored with a warning. |

`groups` |
A logical flag, indicating whether to use the last dimension as a grouping variable in the display. |

`origin, stack` |
Arguments to |

`horizontal` |
Logical flag, indicating whether the plot should be horizontal (with the categorical variable on the y-axis) or vertical. |

`...` |
Other arguments, passed to the underlying |

The first dimension is used as the variable on the categorical 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 beforehand 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.

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.

Deepayan Sarkar [email protected]

`barchart`

, `t`

, `aperm`

,
`table`

, `panel.barchart`

,
`Lattice`

1 2 |

lattice documentation built on May 31, 2017, 4:47 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.