[R] 'From' and 'to' arguments in panel.abline

Sébastien pomchip at free.fr
Mon Aug 13 21:39:40 CEST 2007


Dear R-users,

The help does not give much details on the use of the arguments 'from' 
and 'to' in the panel.abline function. I have looked in the archives but 
did not find how to implement them. My different tries failed miserably. 
E.g, the following code doesn't seem to work, in a sense that the line 
is not limited to the (0,10) range.
Do these arguments really apply to panel.abline? If so, how should they 
be specified?

xy<-data.frame(x<-0.1:10,y<-0.1:10)
xyplot(y~x,data=xy,
             panel = function(x, y, ...){
       panel.abline(a=0,b=1,from=0,to=10)
       panel.xyplot(x,y)
       })

Thanks you in advance for your help.

Sebastien



More information about the R-help mailing list