Re: [R] xyplot and abline

2005-09-22 Thread John Charles Considine
key=list(columns=3, > text=list(paste(c("forecast: ", "",""), >unique(fcast$LAG), "years")), >points=Rows(sps,1:3))) > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behal

[R] xyplot and abline

2005-09-22 Thread John Charles Considine
How should I pass abline to this function so that I get a reference line at h=0 in each panel? sps <- trellis.par.get("superpose.symbol") sps$pch <- 1:10 trellis.par.set("superpose.symbol",sps) xyplot(fcast$LOGDIFF~fcast$VINTAGE|fcast$REGION, groups=fcast$LAG, panel=panel.superpose,

Re: [R] xyplot and abline

2005-09-17 Thread hadley wickham
> I wonderif there is a simple way to draw a regression line in the xyplot: Try: xyplot(y ~ x| age.cut, xlab="x", ylab="y", type=c("p","r")) Hadley __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

Re: [R] xyplot and abline

2005-09-17 Thread Prof Brian Ripley
On Sat, 17 Sep 2005, Marc Bernard wrote: > 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",

[R] xyplot and abline

2005-09-17 Thread Marc Bernard
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)