Learn R Programming

mirt (version 1.19)

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.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
data(LSAT7)
head(LSAT7)
LSAT7full <- expand.table(LSAT7)
head(LSAT7full)

LSAT7full <- expand.table(LSAT7, sample = TRUE)
head(LSAT7full)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab