[R] R2.4 xyplot + panel.number problem

Duncan Mackay mackay at northnet.com.au
Wed Nov 29 08:27:10 CET 2006


Hi

Try ?panel.number

As you have not specified R version I cannot be more specific but for 2.4 
there have been changes to lattice
including panel.number to panel.number()

At 14:10 29/11/06, you wrote:
>Hi all;
>I'm trying to display a 2 panel plot for the Puromycin data from R
>with 2 different non-linear models fitted to each group. The problem
>is that as far as I know panel.number doesn't work in the latest
>version of R. Can anyone give a hint how to solve this?
>
>Here is the code that I used before and now doesn't work
>
>xyplot(rate ~conc| state,Puromycin,
>panel=function(x,y,panel.number,...){
>panel.xyplot(x,y,...)
>x.temp<-seq(0, 1.2, len = 101)
>if (panel.number==1) {
>y.temp<-(coef(m2.nls)[1]+coef(m2.nls)[2]) * x.temp/
>(coef(m2.nls)[3] + x.temp)
>panel.lines(x.temp,y.temp,col=2)}
>if (panel.number==2) {
>y.temp<-coef(m2.nls)[1] * x.temp/
>(coef(m2.nls)[3] + x.temp)
>panel.lines(x.temp,y.temp,col=2)}
>  },
>ylab="Rate of reaction",
>xlab="Substrate concentration",
>main = "Puromycin---comparison bt. treated and untreated"
>  )
>
>thanks for any idea
>
>______________________________________________
>R-help at 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
>and provide commented, minimal, self-contained, reproducible code.

Regards

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
ARMIDALE NSW 2351
Email: dmackay9 at pobox.une.edu.au
   home: mackay at northnet.com.au
Phone: 02 6772 9794



More information about the R-help mailing list