search for: mastreat

Displaying 1 result from an estimated 1 matches for "mastreat".

Did you mean: maltreat
2006 Apr 04
2
xyplot: getting data into the panel function
In xyplot, I would like to get the "data into the panel function" in the following sense: Consider xyplot(scc~time|cowidp, data=cow.s,type=c("l"), panel=function(x,y,subscripts,...){ panel.xyplot(x,y,...) vvv<-cow.s[which(!is.na(cow.s[subscripts,"mastreat"])),"time"] panel.abline(v=vvv,col="red",lwd=2) } ) If I want to use a different dataset, say cow.2, I would have to modify the code twice in the panel function. Is there a way of avoiding this? Best regards Søren [[alternative HTML version deleted]]