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.
References
Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory
Package for the R Environment. Journal of Statistical Software, 48(6), 1-29.
10.18637/jss.v048.i06
# NOT RUN {# }# NOT RUN {data(LSAT7)
head(LSAT7)
LSAT7full <- expand.table(LSAT7)
head(LSAT7full)
LSAT7full <- expand.table(LSAT7, sample = TRUE)
head(LSAT7full)
# }# NOT RUN {# }