s-news
[Top] [All Lists]

Plotting time series in an xyplot

To: s-news@lists.biostat.wustl.edu
Subject: Plotting time series in an xyplot
From: "Data Analytics Corp." <dataanalytics@earthlink.net>
Date: Tue, 01 Jul 2008 10:32:27 -0400
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=CJcWttLVCt2s/0l77arK0POy0W2Fr4GAQy5sVaCjeGTJivevmqQk8paWbExvTAcX; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP;
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)
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


<Prev in Thread] Current Thread [Next in Thread>