# NOT RUN {
data(ProfChal)
tmp <- data.matrix(ProfChal[,1:5])
rownames(tmp) <- ProfChal$Question
ProfChal.list <- split.data.frame(tmp, ProfChal$Subtable)
## Original list of matrices is difficult to read because
## it is displayed on too many lines.
ProfChal.list[2:3]
## Single matrix with long list item names and long row names
## of argument list retained as an attribute.
as.listOfNamedMatrices(ProfChal.list[2:3], minlength=6)
# }
# NOT RUN {
## NA as a dimname value
tmp <- structure(c(0, 0, 0, 6293, 18200, 2122,
0, 0, 0, 2462, 7015, 5589,
6908, 5337, 842, 0, 0, 0),
.Dim = c(3L, 2L, 3L),
.Dimnames = list(c("A", "B", "C"),
c("D", "E"),
c("F", "G", NA)))
tmp
as.MatrixList(tmp)
# }
# NOT RUN {
# }
# NOT RUN {
sapply(as.MatrixList(tmp3), as.likert, simplify=FALSE) ## odd number of levels.
data(NZScienceTeaching)
likert(Question ~ ., NZScienceTeaching)
likert(Question ~ . | Subtable, data=NZScienceTeaching)
likert(Question ~ . | Subtable, data=NZScienceTeaching,
layout=c(1,2), scales=list(y=list(relation="free")))
# }
Run the code above in your browser using DataLab