I am a novice user of R and trying to create a graph using the likert function from the HH package. My problem seems to come from repeating category labels. Itβs easier to show the problem:
library(HH) responses <- data.frame( Subtable= c(rep('Var1',5),rep('Var2',4),rep('Var3',3)), Question=c('very low','low','average','high','very high', '<12', '12-14', '15+', 'missing', '<25','25+','missing'), Res1=as.numeric(c(0.05, 0.19, 0.38, 0.24, .07, 0.09, 0.73, 0.17, 0.02, 0.78, 0.20, 0.02)), Res2=as.numeric(c(0.19, 0.04, 0.39, 0.22, 0.06, 0.09, 0.50, 0.16, 0.02, 0.75, 0.46, 0.20))) likert(Question ~ . | Subtable, responses, scales=list(y=list(relation="free")), layout=c(1,3), positive.order=TRUE, between=list(y=0), strip=FALSE, strip.left=strip.custom(bg="gray97"), par.strip.text=list(cex=.6, lines=3), main="Description of Sample",rightAxis=FALSE, ylab=NULL, xlab='Percent')
Unfortunately, this creates weird spaces that are not actually present, as shown in the bottom panel of the following graph:

This seems to come from a re-category of "missing." My actual data has several repetitions (for example, "no", "other"), and whenever they are included, I get these extra spaces. If I run the same code but delete duplicate categories, it works correctly. In this case, this means changing the "responses" in the above code to responses[! responses$Question %in% 'missing',] responses[! responses$Question %in% 'missing',] .
Can someone tell me how to create a chart using all categories without getting extra spaces? Thanks for your help and patience.
-Z
R 3.0.2 HH 3.0-3 lattice 0.20-24 latticeExtra 0.6-26