An example: I have a non-aligned time series

> notAligned

GMT

           TS.1   TS.2  TS.3  TS.4

2011-02-03   NA    1    4    8

2011-02-04    1   NA    2   NA

2011-02-07    5    6   NA   NA

2011-02-08   NA    2   NA    9

 

If I use the align function, it returns this

> align(notAligned)

GMT

           TS.1  TS.2  TS.3  TS.4

2011-02-03   NA    1    4    8

2011-02-04    1    1    2    8

2011-02-07    5    6    2    8

2011-02-08   NA    2   NA    9

 

It correctly fills NAs on row 2 and row 3, but it does not fill NAs on row 4
(2011-02-08). 

I expect the last row look like this : 

TS.1  TS.2  TS.3  TS.4

2011-02-08   5     2   2   9

 

Did I misunderstand the function? Is there a way to work around this? 

Thanks for your help

 

 

Zhang Chunrong


	[[alternative HTML version deleted]]

