[R] Time problems (POSIXct)

Research risk2009 at ath.forthnet.gr
Thu May 20 16:48:39 CEST 2010


Hello,

I have a zoo time series object (say a)  with the following time 
stamp/format



[1] "1950-01-03 GMT" "1950-01-04 GMT" "1950-01-05 GMT" "1950-01-06 GMT"
[5] "1950-01-09 GMT" "1950-01-10 GMT"


and another (say b) with


[1] "1950-01-05" "1950-01-06" "1950-01-09" "1950-01-10" "1950-01-11"
[6] "1950-01-12"


I want to merge these series   but when I try:


 > head(merge(a, b ))
                     a                   b
1950-01-03 02:00:00       16.66   NA
1950-01-04 02:00:00       16.85   NA
1950-01-05 02:00:00       16.93   NA
1950-01-06 02:00:00       16.98   NA
1950-01-09 02:00:00       17.08   NA
1950-01-10 02:00:00       17.03   NA
Warning message:
In merge.zoo(a, b) :
   Index vectors are of different classes: POSIXt Date
 >

Anybody can help?  I tried as.POSIXct(a,tz="GMT") but it doesn't seem to 
work....

Many thanks in advance!

Costas
               _
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          10.1
year           2009
month          12
day            14
svn rev        50720
language       R
version.string R version 2.10.1 (2009-12-14)
 >



More information about the R-help mailing list