powered by
table2data(dat, freq = tail(colnames(dat), 1))
data.frame(price = c("$200","$300"), sale = c(10, 2)) %>% table2data
Run the code above in your browser using DataLab