[R] sorting Trellis panels

From: Patrick Lorch <plorch_at_email.unc.edu>
Date: Fri 23 Jul 2004 - 05:10:45 EST


Can anyone explain how to properly use index.cond? I cannot include it in the xyplot command and get what I expect. For example,

        plot<-xyplot(y ~ x | z, data)
# let's say z is a factor with six levels

gives a nice plot but I am unhappy with the order of panels. I can get the order I want by

        plot$index.plot[[1]]<-c(1,6,4,3,2,5)

I cannot seem to get it with either

        plot<-xyplot(y ~ x | z, data,index.cond=list(order(c(1, ,6,4,3,2,5)))) or

	plot<-xyplot(y ~ x | z, data)
	plot
	update(plot,index.cond=list(order(c(1,6,4,3,2,5))))

I suspect it is some obvious misunderstanding of my use of list(order(...)).

Thanks for any help you can give,

         -Pat

Dr. Patrick D. Lorch

                 plorch@email.unc.edu
      http://www.unc.edu/~plorch/lorch.html
Department of Biology           W: 919-843-2320
University of North Carolina F: 919-962-1625

   at Chapel Hill
CB#3280, Coker Hall
Chapel Hill, NC 27599-3280
USA



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 23 05:21:53 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 02:37:30 EST