Re: [R] zoo. window

2010-08-19 Thread Achim Zeileis
On Thu, 19 Aug 2010, wyd...@msn.com wrote: Hi, I have a dataset including monthly date from 1971-01-01 to 2009-01-01. The dates are character variables. I would suggest to use a more suitable class for the index, such as "yearmon" (if you only want to indicate the month anyway) or "Date" (if

[R] zoo. window

2010-08-19 Thread wyd923
Hi, I have a dataset including monthly date from 1971-01-01 to 2009-01-01. The dates are character variables. I want to select the subsample from my original data, so I use mydata3<-window(mydata,start="1972-02-01",end="2005-02-01"), or mydata3<-window(mydata, start=as.date("1972-02-01"),end=as