Walt -
I was doing self-training on time series plots this weekend - not fun.
Did you try par(mfrow=c(2,2)) to create a four-panel area? If you do
that, I think you can create any plot in the four spots, including a
time series plot. Look in Guide to Graphics pg 33. Someone on the list
please correct me if I'm wrong.
Win Crawford
-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu
[mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of Data
Analytics Corp.
Sent: Tuesday, July 01, 2008 10:32 AM
To: s-news@lists.biostat.wustl.edu
Subject: [S] Plotting time series in an xyplot
Good morning,
I have a data frame with four variables: quarter, year, count of delays
in a category, the category label. There are four categories (A, B, C,
and D), four years (2005 - 2008), and four quarters per year, so there
are 64 rows. Some data may look like:
quarter year count category
1 2005 10 A
2 2005 5 A
3 2005 12 A
4 2005 8 A
...
4 2008 1 D
I want to create a four panel chart (one panel for each category) with
the quarter/year on the x-axis as a time series and the count on the
vertical of each panel. XYPLOT only allows (as far as I can tell), two
numerics for plotting. But I want time on the x-axis. The function
plot.timeSeries creates the type of chart I want, but not in a panel.
How can I create my panel chart? Any advise? I would like something
like xyplot(timeSeries(x) ~ count | category, data = x).
I'm using S+ 8 on Windows Vista.
Thanks,
Walt
--
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
dataanalytics@earthlink.net
www.dataanalyticscorp.com
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message: unsubscribe s-news
......................................................................
The information contained in this email message is intended only for the use of
the individuals to whom it is
addressed and may contain information that is privileged and sensitive. If the
reader of this message is not
the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this
communication is strictly prohibited. If you have received this communication
in error, please notify the
sender immediately by email at the above referenced address. Thank you.
|