[R] getting time series into r

From: Heiman, Thomas J. <theiman_at_mitre.org>
Date: Mon, 23 May 2011 13:30:49 -0400


Hi,

I am trying to get the following two timeseries (these are small subsets of the whole thing) into R so I can merge them using zoo.

Timeseries 1=[                                                                                                                                                                                  Date                      Count
9/28/2003

1505

10/5/2003

1535

10/12/2003

1549

10/19/2003

1466

10/26/2003

1460

11/2/2003

1501

11/9/2003

1456

11/16/2003

1806

11/23/2003

2466

11/30/2003

4309

12/7/2003

7490]

Timeseries2=[
YEARMODA    TEMP    DEWP   SLP   STP  FRSHTT 20030928

68

24

58.6

24

1008

24

1002.5

24

110010

20030929

57.7

24

47.7

24

1014

24

1008.4

24

10000

20030930

53.7

24

42

24

1023.7

24

1018

24

0

20031001

54.7

24

45.7

24

1022.3

24

1016.5

23

10000

20031002

52

24

37.4

24

1019.8

24

1014.1

24

0

20031003

49

24

32.5

24

1022.5

24

1016.7

24

100000

20031004

53.3

24

43.6

24

1012.6

24

1006.9

24

10000

20031005

54.6

24

40.2

24

1015.4

24

1009.7

24

0

20031006

56.6

24

42.4

24

1018.9

24

1013.2

24

0

20031007

58.4

24

45.3

24

1021.7

24

1016.1

24

0

]

tmp <- read.table("baltimore.csv", sep = ",") ##This is timeseries 2 z <- zoo(tmp[, 2:9], as.Date(as.character(tmp[, 1]), format = "%d %b %Y"))

tmp1 <- read.table("baltimorefludata.csv", sep = ",")##This is timeseries 1 z2 <- zoo(tmp[,2], as.Date(tmp[, 1]), format = "%d %b %Y"))

R is not recognizing Date or YEARMODA as dates..Any suggestions on what I am doing wrong or how to fix it would be greatly appreciated!!!

Sincerely,

tom

Thomas Heiman, PhD
Info Systems Eng, Sr
The MITRE Corporation | Center for Enterprise Modernization Office: 703-983-2951 | theiman_at_mitre.org<mailto:theiman_at_mitre.org>

        [[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. Received on Mon 23 May 2011 - 17:40:37 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Mon 23 May 2011 - 18:00:08 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