[R] R2.4 xyplot + panel.number problem
Pedro Mardones
mardones.p at gmail.com
Wed Nov 29 05:10:38 CET 2006
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
More information about the R-help
mailing list