Create data.frame from a table

table2data(dataset, freq = tail(colnames(dataset), 1))

Arguments

dataset

Data.frame

freq

Column name with frequency information

Examples

data.frame(price = c("$200","$300"), sale = c(10, 2)) %>% table2data()
#> price #> 1 $200 #> 2 $200 #> 3 $200 #> 4 $200 #> 5 $200 #> 6 $200 #> 7 $200 #> 8 $200 #> 9 $200 #> 10 $200 #> 11 $300 #> 12 $300