A helper function for transforming a table into a data frame.
tab2dat(tab)
tab
A table or (sparse) matrix.
A data frame.