[R] merge.zoo and fill
Research
risk2009 at ath.forthnet.gr
Wed Jun 30 16:05:59 CEST 2010
Hello again,
I merge different zoo time series with prices at different dates. This
returns a multivariate zoo object with NA's at various points i.e.,
2010-02-28 NA NA NA NA 850.2 2444.4 NA
NA NA NA NA NA NA
2010-03-01 61.1 55.3 61.5 81.24 NA NA 1712.2 3.3
11139.3 163.7 2242.4 9015.6 109.791
2010-03-31 NA NA NA NA 846.5 2439.0 NA
NA NA NA NA NA NA
2010-04-01 66.9 49.4 65.7 84.48 NA NA 1700.6 3.8
11203.0 164.4 2245.7 9064.5 109.887
2010-04-30 NA NA NA NA 838.0 2440.0 NA
NA NA NA NA NA NA
2010-05-01 66.6 45.6 65.7 73.84 NA NA 1705.3 4.0
11252.0 165.1 2248.4 9113.9 110.065
Will the "fill" parameter of the zoo.merge() allow a missing value for
each zoo object merged to take the last available (previous in time)
price for that particular time series or one has to do that using the
na.locf() command afterwards?
I want ot keep the series as zoo and not convert to other formats or
interpolate (as in the FAQ)....
Thanks,
Costas
More information about the R-help
mailing list