Learn R Programming

broom (version 0.3.4)

tidy.table: tidy a table object

Description

A table, typically created by the table function, contains a contingency table of frequencies across multiple vectors. This directly calls the as.data.frame.table method, which melts it into a data frame with one column for each variable and a Freq column.

Usage

## S3 method for class 'table':
tidy(x, ...)

Arguments

x
An object of class "table"
...
Extra arguments (not used)

See Also

as.data.frame.table

Examples

Run this code
tab <- with(airquality, table(cut(Temp, quantile(Temp)), Month))
tidy(tab)

Run the code above in your browser using DataLab