Dear all, I am a new user of R ;-) (I started three months ago) and I am going very slow?. I am using lattice and am trying to draw a multipanel figure. The problems are that I am not able to find out how to: 1. Set the order of the panels. 2. Set the order of the x axes. :rules: The codes I am using are: Benthic<- read.table(file="WWTP 1 WICK 5.txt",header = TRUE) library(lattice) xyplot(Concentration ~ Day | Pharmaceutical, layout = c (3,4), scales = list(x = list(rot = 45)), groups= Month, data = Benthic, main="Wick WWTP", xlab = "Colection time (Days)", ylab = "Concentration (ng/L)", ylim= c(1000,-100), auto.key=list(space = "right"),# a?ade la leyenda par.settings = simpleTheme(pch=1:2), panel=function(x,y,...) { panel.superpose(x,y,...) panel.superpose(x,y,panel.groups="panel.lmline",...)}) Thanks in advance, Carol -- View this message in context: http://n4.nabble.com/Panel-order-in-lattice-with-xyplot-tp1009866p1009866.html Sent from the R help mailing list archive at Nabble.com.
Carol wrote:> > I am a new user of R and I am going very slow?. >Never mind, R has s a steep (or, more accurately, shallow) learning curve. Carol wrote:> > I am using lattice and am trying to draw a multipanel figure. The problems > are that I am not able to find out how to: > 1. Set the order of the panels. > 2. Set the order of the x axes. >For an easy, but restricted, way to change the order of the panels, see as.table in the documentation of xyplot. To change the order panels with categorical variable, it is easiest to change the order of the categories; see, for example, "reorder". Carol wrote:> > Benthic<- read.table(file="WWTP 1 WICK 5.txt",header = TRUE) > .. Code removed >Your example is fine, with the exception that other people cannot reproduce it because they do not have the data file. So always include dummy data for a detailed reply -- View this message in context: http://n4.nabble.com/Panel-order-in-lattice-with-xyplot-tp1009866p1010379.html Sent from the R help mailing list archive at Nabble.com.