[R] ZOO object colnames refering to Dates

Research risk2009 at ath.forthnet.gr
Thu Feb 11 10:44:23 CET 2010


Hello,

I have  large zoo objects (about 100 or more time series merged next to 
eachother). Example:

     X05.Oct.99 X05.Nov.99 X05.Dec.99 X05.Jan.00 X05.Feb.00 X05.Mar.00 
X05.Apr.00 X05.May.00 X05.Jun.00
[1,]     5649.3     5679.4     5679.4     5679.4     5679.4     
5679.4     5679.4     5679.4     5679.4
[2,]     5682.7     5719.2     5719.2     5719.2     5719.2     
5719.2     5719.2     5719.2     5719.2
[3,]     5697.5     5745.5     5745.5     5745.5     5745.5     
5745.5     5745.5     5745.5     5745.5
[4,]     5723.9     5767.8     5767.8     5767.8     5767.8     
5767.8     5767.8     5767.8     5767.8
[5,]     5782.1     5829.8     5829.8     5829.8     5829.8     
5829.8     5829.8     5829.8     5829.8
[6,]     5815.0     5850.9     5850.9     5850.9     5850.9     
5850.9     5850.9     5850.9     5850.9
 >

The column names contain dates, i.e.,  X05.Oct.99 stands for a time 
sequence that was obtained on 05/10/1999. Each column is obtained  month 
+ 1 from the previous one.

Is it possible to access these columns (time series data) via a for/next 
loop (or a while) that uses dates i/o (i in 1:8) in the above example?

Say: if month==Oct and year==1999 choose column X05.Oct.99 ...

Could I also generate automatically a variable, appropriately named from 
the corresponding columns name that would contain the data and access it 
by that date?

Any pointers really appreciated.

Thanks in advance,
Costas


__________ Information from ESET Smart Security, version of virus signature database 4857 (20100211) __________

The message was checked by ESET Smart Security.

http://www.eset.com



More information about the R-help mailing list