expand.table: Expand summary table of patterns and frequencies
Description
The expand.table function expands a summary table of unique response
patterns to a full sized data-set. The response frequencies must be on the
rightmost column of the input data.
Usage
expand.table(tabdata, sample = FALSE)
Arguments
tabdata
An object of class data.frame or matrix
with the unique response patterns and the number of frequencies
in the rightmost column
sample
logical; randomly switch the rows in the expanded table? This does not change the
expanded data, only the row locations
Value
Returns a numeric matrix with all the response patterns.
# NOT RUN {# }# NOT RUN {data(LSAT7)
head(LSAT7)
LSAT7full <- expand.table(LSAT7)
head(LSAT7full)
LSAT7full <- expand.table(LSAT7, sample = TRUE)
head(LSAT7full)
# }# NOT RUN {# }