Re: [R] xyplot help

From: Felix Andrews <felix_at_nfrac.org>
Date: Tue, 22 Jul 2008 18:30:16 +1000

v <- factor(1:2)
xyplot(1:2 ~ 1:2 | v,
  strip=strip.custom(strip.names=TRUE, sep="="))

or

v <- shingle(1:2)
xyplot(1:2 ~ 1:2 | v,
  strip=strip.custom(strip.levels=TRUE, sep="="))

On Tue, Jul 22, 2008 at 4:26 PM, <ae2356_at_hotmail.com> wrote:
> I have a question about xyplot. Suppose I want to plot say a response variable y vs a predictor x within groups defined by a variable called z. And suppose I have another variable v=1,2 with two levels. I would use the following command to get a "spaghetti plot" with two panels defined by v. xyplot(y~x|v,groups=z,type="l") My question is that on top of the panels, the title of each panel would just say v. Suppose I want it to say v=1 for one panel and v=2 for the other. Can someone tell me how I would go about doing this? Thanks for your help.
> _________________________________________________________________
> With Windows Live for mobile, your contacts travel with you.
>
> 072008
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_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.
>

-- 
Felix Andrews / 安福立
PhD candidate
Integrated Catchment Assessment and Management Centre
The Fenner School of Environment and Society
The Australian National University (Building 48A), ACT 0200
Beijing Bag, Locked Bag 40, Kingston ACT 2604
http://www.neurofractal.org/felix/
3358 543D AAC6 22C2 D336 80D9 360B 72DD 3E4C F5D8

______________________________________________
R-help_at_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.
Received on Tue 22 Jul 2008 - 09:03:07 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 Jul 2008 - 09:32:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive