"itemresp"
data objects.
"format"(x, sep = c(",", ":"), brackets = TRUE, abbreviate = NULL, mscale = TRUE, labels = FALSE, width = getOption("width") - 7L, ...) "print"(x, quote = FALSE, ...)
"itemresp"
.FALSE
, integers 0, 1, ... are used.FALSE
no maximal width is set.print
method just calls format
(passing on all further
arguments) and then prints the resulting string.
itemresp
## item responses from binary matrix
x <- cbind(c(1, 0, 1, 0), c(1, 0, 0, 0), c(0, 1, 1, 1))
xi <- itemresp(x)
## change mscale
mscale(xi) <- c("-", "+")
xi
## flexible formatting
## no/other brackets
print(xi, brackets = FALSE)
print(xi, brackets = c(">>", "<<"))
## include item labels (with different separators)
print(xi, labels = TRUE)
print(xi, labels = TRUE, sep = c(" | ", ": "))
## handling longer mscale categories
mscale(xi) <- c("disagree", "agree")
print(xi)
print(xi, mscale = FALSE)
print(xi, abbreviate = FALSE)
print(xi, abbreviate = FALSE, width = 23)
print(xi, abbreviate = 2)
Run the code above in your browser using DataLab