Patrick Connolly
2002-Aug-12 02:33 UTC
[R] Level sets of factors are different (panel.superpose)
I investigated why I was getting this error message... Error in Ops.factor(groups[subscripts], vals[1]) : Level sets of factors are different which led me to putting a browser in panel.superpose: Called from: panel.superpose(x, y, subscripts, ...) Browse[1]> vals vals [1] 1 2 3 Levels: 1 2 3 Browse[1]> groups[subscripts] groups[subscripts] [1] 1 2 3 1 2 1 2 3 1 2 3 1 2 3 Levels: 1 2 3 this is the line that would fall over (in a for loop) Browse[1]> id <- (groups[subscripts] == vals[i]) so I investigated... Browse[1]> id <- (groups[subscripts] == vals[1]) id <- (groups[subscripts] == vals[1]) Error in Ops.factor(groups[subscripts], vals[1]) : Level sets of factors are different I've not had this problem before, so I'm guessing that in this case, it had something to do with the fact that level 3 was missing in the second instance. I couldn't see why the logical couldn't work that out so I tried something that is often necessary with lists in Splus (3.4 anyway). I changed the line to id <- as.vector(groups[subscripts]) == as.vector(vals[i]) and it works (at least it doesn't fall over -- I haven't done a thorough check to see if it really is working correctly). Is that what is to be expected? I can't follow why. best -- Patrick Connolly HortResearch Mt Albert Auckland New Zealand Ph: +64-9 815 4200 x 7188 ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ I have the world`s largest collection of seashells. I keep it on all the beaches of the world ... Perhaps you`ve seen it. ---Steven Wright ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ ______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. ______________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Patrick Connolly
2002-Aug-12 05:04 UTC
[R] Level sets of factors are different (panel.superpose)
On Mon, 12-Aug-2002 at 02:33PM +1200, Patrick Connolly wrote: |> I investigated why I was getting this error message... |> |> Error in Ops.factor(groups[subscripts], vals[1]) : |> Level sets of factors are different Since then, I've restarted that R session and the "problem" has vanished. Seems to be a memory leak of some type happens if a session is left open for a couple of weeks. best -- Patrick Connolly HortResearch Mt Albert Auckland New Zealand Ph: +64-9 815 4200 x 7188 ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ I have the world`s largest collection of seashells. I keep it on all the beaches of the world ... Perhaps you`ve seen it. ---Steven Wright ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~ ______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail. ______________________________________________________ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._