Description Usage Arguments See Also Examples
A method for recovering a data.frame out of summarized data, i.e.  contingency table or aggregated data.
| 1 2 3 4 5 6 7 8 | 
| x | the table object as a data.frame, table, or, matrix. | 
| freq | the column name of count values. | 
| row.names | row names to add to  | 
| dimnames | set the dimnames of object if required. | 
| type | the type of variable. If NULL, ordered factor is returned. | 
| col.names | column names to add to the data.frame. | 
| ... | Extra parameters ignored. | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | gss <- data.frame(
expand.grid(sex=c("female", "male"),
party=c("dem", "indep", "rep")),
count=c(279,165,73,47,225,191))
print(gss) # aggregated data.frame
# Then expand it:
GSS <- untable(gss, freq="count")
head(GSS)
# Expand from a table or xtable object:
# Fisher's Tea-Tasting Experiment data
 tea <- table(poured=c("Yes", "Yes", "Yes", "No","Yes","No", "No", "No"),
             guess=c("Yes", "Yes", "Yes", "Yes", "No", "No","No","No"))
untable(tea)
# Expand with a vector of weights
untable(c(3,3,3), dimnames=list(c("Brazil","Colombia","Argentina")))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.