[R] Help with pair plot

2007-02-18 Thread Benjamin Dickgiesser
Hi, I'm trying to create a plot using pair. Currently I'm doing the following pairs(~mpg + hp + wt , data=cars, labels = c(Miles per Gallon,Horsepower,Weight),pch = c(24,25)[unclass(cars$tr + 1)], bg = c(red, green3)[unclass(cars$tr + 1)],panel=panel.smooth) for the attached dataset.

Re: [R] Help with pair plot

2007-02-18 Thread Benjamin Dickgiesser
I forgot to add that I figured how to do a single regression line using: panel.fitline-function(x, y, digits=2, prefix=, cex.cor, ...) { points(x, y, ...) reg - coef(lm(y ~ x)) abline(coef=reg,untf=F,col=blue) } and adding: panel=panel.fitline to pairs. But I am not sure how to add two lines