[From nobody Sat Mar 18 16:24:09 2006 Hi all, I've got some troubles with a Lattice plot. The error I get is Error in Ops.factor(groups[subscripts], vals[i]) : Level sets of factors are different which sort of doesn't make sense to me. Can you please help me figure out what it means? Here is the code: my.panelconstr = function(x,y,...){ panel.barchart(x,y,horizontal=F) panel.superpose(x,y,...) } attach(m1data) ! is.na(asp.durms) & !is.na(agem) & !is.na(Cplace) & !is.na(tokentype)& !is.na(voicing)-> sel detach(m1data) barchart(asp.durms[sel] ~ agem[sel] | Cplace[sel] + tokentype[sel],data=m1data,xlab="Subject Age (months)",ylab="Duration of Aspiration (ms)",panel=my.panelconstr,groups=voicing[sel],key=list(points=Rows(trellis.par.get()$superpose.symbol, 1:2),text=list(c("Percieved voiced ","Percieved voiceless")),adj=c(0,0),space="right"),horizontal=F) Here is some information about the factors involved: > levels(m1data$agem) > NULL > levels(m1data$durms) > NULL > levels(m1data$Cplace) > [1] "bilabial" "dental" "velar" > levels(m1data$tokentype) > [1] "CC" "voiced C" "voiceless C" > levels(m1data$voicing) > [1] "voiced" "voiceless" > attach(m1data) > ! is.na(asp.durms) & !is.na(agem) & !is.na(Cplace) & !is.na(tokentype)& !is.na(voicing)-> sel > detach(m1data) > levels(m1data$voicing[sel]) > [1] "voiced" "voiceless" If I remove everything involving the groups (groups= as well as the panel.superpose..) it works, but I need groups too.. Happy for all the help I can get! /Fredrik -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ ]