Re: [R] help w/ xyplot and panel.lmline

From: Sebastian Luque <sluque_at_mun.ca>
Date: Wed 16 Mar 2005 - 08:48:17 EST

eesteves@ualg.pt wrote:

[...]

> Is it possible to change the plotted characters and regression lines for
> two of the panels (corresponding to dates 101 and 172). For these dates
> I intend to use data only for ages 9-14 d instead of 5-14 d as for the
> remaining.

Have a look at argument 'panel.number' that you can use when defining your panel function. You can create a conditional statement based on that argument. Perhaps something like (replace where appropriate):

 xyplot(log(no.larvae)~age.cls|factor(day),data=mortal,

        layout=c(7,1),aspect=5/3,
        xlab="Age class (d)",ylab="Ln(Abundance)",ylim=c(-2.5,6.5),xlim=c(0,30),
        panel = function(x, y, panel.number, ...) {
          if(panel.number == "panel number for day 101" |
             panel.number == "panel number for day 172") {
            "panel functions for these days here"} else {
              "panel functions for other days here"}
        })

works for you? I've used something similar with 'panel.groups' as the main panel function, but have never done it as above, so beware :-)

-- 
Sebastian Luque

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Wed Mar 16 08:53:31 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:48 EST