# NOT RUN {
## See file HH/demo/likertMosaic-paper.r for a complete set of examples.
# }
# NOT RUN {
require(vcd)
data(ProfChal)
likertMosaic(Question ~ . | Subtable, ProfChal,
main="Is your job professionally challenging?")
likertMosaic(Question ~ . | Subtable, ProfChal,
main="Is your job professionally challenging?", as.percent=TRUE)
likertMosaic(Question ~ . | Subtable, ProfChal,
main="Is your job professionally challenging?", as.percent=TRUE,
positive.order=TRUE)
likertMosaic(Question ~ . | Subtable, ProfChal,
main="Is your job professionally challenging?", as.percent=TRUE,
variable.width=TRUE)
EmpRows <- ProfChal$Subtable == "Employment sector"
ProfChal2 <- ProfChal[EmpRows, 1:5]
rownames(ProfChal2) <- substr(ProfChal[EmpRows, "Question"], 1, 5)
likertMosaic(ProfChal2)
likertMosaic(ProfChal2, main="Employment")
likertMosaic(ProfChal2, main="Employment", ReferenceZero=0)
likertMosaic(ProfChal2, main="Employment", ReferenceZero=3.5)
likertMosaic(ProfChal2, main="Employment", ReferenceZero=4)
likertMosaic(ProfChal2, main="Employment", ReferenceZero=6)
likertMosaic(ProfChal2, main="Employment", positive.order=TRUE)
likertMosaic(ProfChal2, main="Employment", variable.width=TRUE)
likertMosaic(~ ., data.frame(ProfChal2), main="Employment", positive.order=TRUE)
likertMosaic(~ ., data.frame(ProfChal2), main="Employment", variable.width=TRUE)
likert(~ ., data.frame(ProfChal2), main="Employment", variable.width=TRUE)
data(SFF8121)
likertMosaic(aperm(SFF8121, c(3,1,2)))
# }
Run the code above in your browser using DataLab