Creates a flat contingency table from a list array, such as the result of
tapply() when the applied function returns a named vector.
Usage
# S3 method for class 'list'
ftable(x, row.vars = NULL, col.vars = NULL, ...)Arguments
- x
A list with a
dimattribute, typically produced bytapply(). Each element must be a vector of equal length and have identical names.- row.vars
row variables passed to
ftable(). Defaults to all dimensions except those specified incol.vars.- col.vars
column variables passed to
ftable(). Defaults to the dimension created from the names of the list elements.- ...
further arguments passed to
ftable().
Details
Each list element is expanded into an additional dimension corresponding to
the names of the returned vector. The resulting array is then passed to
ftable().
This is particularly useful for displaying multi-dimensional summaries such
as confidence intervals returned by meanCI(), where each cell contains
several statistics (e.g. estimate, lower CI, upper CI).
The names of the vectors stored in the list elements become an additional dimension of the resulting array. By default, this new dimension is shown in the columns of the flat contingency table.
