Skip to contents

Note that as.data.frame can do this, but you get aggregated rows with a Freq column

Usage

table2dt(Tab)

table2df(Tab)

Arguments

Tab

The table

Functions

  • table2df(): Convert a table to a (disaggregated) data frame

Examples

table2dt(Titanic)
#> [1] -5
head(table2df(Titanic))
#>   Class  Sex   Age Survived
#> 1   3rd Male Child       No
#> 2   3rd Male Child       No
#> 3   3rd Male Child       No
#> 4   3rd Male Child       No
#> 5   3rd Male Child       No
#> 6   3rd Male Child       No