[prev in list] [next in list] [prev in thread] [next in thread]
List: r-help
Subject: Re: [R] trellis: conditional statements within a panel function
From: "Deepayan Sarkar" <deepayan.sarkar () gmail ! com>
Date: 2008-11-01 2:06:30
Message-ID: eb555e660810311906h5c9c61c1vdd06880f6e1f00f9 () mail ! gmail ! com
[Download RAW message or body]
On 10/31/08, erwann rogard <erwann.rogard@gmail.com> wrote:
> hello,
>
> what i'm trying to achieve is shown in the comment (# ...) below, which is
> surely very wrong, but probably intuitively more meaningful that i can
> provide in words.
>
> xyplot(y~x2|x1+which,data=make.groups(
> "a"=data.a,
> "b"=data.b,
> "c"=data.c
> ),
> panel=function(...){
> panel.abline(a=0,b=0)
> panel.points(...)
> # if(x1==0 & which=="a") panel.abline(...)
> },
> layout=c(2,3),
> pch=20,
> ylim=c(-10,10),
> xlab="x2",
> cex=0.5
> )
Check ?which.packet.
-Deepayan
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic