Skip to content

Time series graphs, question about using zoo [SEC=UNCLASSIFIED]

1 message · Crombie, Joe

#
Hi Fang,

An easy way of doing this is by:
Cheers  Joe

 
Joe Crombie
 
Information and Risk Sciences
Bureau of Rural Science
Canberra  Australia
 
p: +61 2 6272 5906
e: joe.crombie at brs.gov.au


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of fang liu
Sent: Friday, 21 September 2007 8:35 AM
To: r-help at r-project.org
Subject: Re: [R] Time series graphs, question about using zoo

Hi,
Can you tell me what is the meaning for "tail, 1"  in "aggregate"?
I also want to get some similar graph, but the data is not time series
data.
Suppose here is my data one, I want a graph with x-axis is just the
index(1:9).
The graph plot all the variable A, B,C,D. So there should be 4 lines for
each graph. For the A line, at each time point, the letter A should be
on the line. And the same goes for the B line.
                    A           B            C        D
So I add a name for each row
rownames(one) <- c(1:9)
z <- zooreg(as.matrix(one), start = 1, freq = 1) z <- aggregate(z,
as.Date, tail, 1) plot(z, plot.type = "single",  type = "o",
	pch = c("A", "B", "C", "D"), lty = 1:2)

I get the plot, which I think it should be right. but the problem is
that the x-axis still have month (Jan, ) on it and I didnot get
"A,B,C,D" on my graph, is there any thing wrong?
c("Bob",
essentially the same.
_________________________________________________________________
[[replacing trailing spam]]

______________________________________________
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.

------IMPORTANT - This message has been issued by The Department of Agriculture, Fisheries and Forestry (DAFF). The information transmitted is for the use of the intended recipient only and may contain confidential and/or legally privileged material. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. 

Any reproduction, publication, communication, re-transmission, disclosure, dissemination or other use of the information contained in this e-mail by persons or entities other than the intended recipient is prohibited. The taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error please notify the sender and delete all copies of this transmission together with any attachments. If you have received this e-mail as part of a valid mailing list and no longer want to receive a message such as this one advise the sender by return e-mail accordingly. Only e-mail correspondence which includes this footer, has been authorised by DAFF 
------