[R] xyplot and abline

From: Marc Bernard <bernarduse1_at_yahoo.fr>
Date: Sun 18 Sep 2005 - 01:01:45 EST

Dear All,  

I wonderif there is a simple way to draw a regression line in the xyplot: more specifically, let:  

age <- c(20:30, 31:40 )
age.cut <- cut(age, breaks = 2 )
y<- rnorm(20)
x <- rnorm(20,4,1)  

xyplot(y ~ x| age.cut, xlab="x", ylab="y")  

How to draw (in the plot given by xyplot) the two regression lines (y ~ x) corresponding to the two category of age.cut ?  

Thanks a lot,  


        [[alternative HTML version deleted]]

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 Sep 21 02:26:16 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:15 EST