| To: | David Parkhurst <parkhurs@imap.iu.edu>, S-News <s-news@lists.biostat.wustl.edu> |
|---|---|
| Subject: | Re: Points + lines in trellis |
| From: | "Richard M. Heiberger" <rmh@temple.edu> |
| Date: | Mon, 8 May 2006 22:35:13 -0400 |
## Here is an example using random data.
tmp <- data.frame(x=(-3):3,
y=rnorm(7))
z <- list(aa=matrix(rnorm(10), ncol=2, dimnames=list(NULL,c("x","y"))),
bb=matrix(rnorm(20), ncol=2, dimnames=list(NULL,c("x","y"))),
cc=matrix(rnorm(18), ncol=2, dimnames=list(NULL,c("x","y"))),
dd=matrix(rnorm(12), ncol=2, dimnames=list(NULL,c("x","y"))))
group=factor(names(z))
xyplot(y ~ x | group, z=z, data=tmp,
panel=function(x, y, z, ...) {
panel.xyplot(x=tmp$x, y=tmp$y, ..., pch=16)
cell=get("cell", frame=sys.parent())
panel.xyplot(x=z[[cell]][,"x"], y=z[[cell]][,"y"], type="l")
},
layout=c(2,2)
)
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Points + lines in trellis, David Parkhurst |
|---|---|
| Next by Date: | Problem copying column id's and data to new files., c.rejwan |
| Previous by Thread: | Points + lines in trellis, David Parkhurst |
| Next by Thread: | Problem copying column id's and data to new files., c.rejwan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |