[R-SIG-Finance] insert element in IBrokers/XTS time series?

Michael comtech.usa at gmail.com
Sat Jul 4 02:01:18 CEST 2009


Hi all,

Let's say I have the following timeseres in IBrokers and XTS:

2009-06-25      18038      18350     18011       18327         5396     18183
2009-06-26      18420      18708     18331       18515         7367     18499
2009-06-29      18546      18688     18423       18577        28728     18555
2009-07-03      17951      18198     17866       18149        38019     18059

I want to add a few more rows, indexed by

"2009-06-30", "2009-07-01", "2009-07-02", and using NA's,

I did the following:

myhist["2009-07-01",]=c(NA, NA, NA, NA, NA, NA, NA, NA)

But it didn't really work.

What's the good way to insert missing points in time series?

Thanks!



More information about the R-SIG-Finance mailing list