Skip to content
Prev 4480 / 15274 Next

insert element in IBrokers/XTS time series?

Eliminating a row is straightforward, e.g.

myhist[time(myhist) != as.Date("2009-06-29"),]

will return everything except the entry for 2009-06-29.

Adding a row is, I believe, a bit more fiddly. You can use

rbind(myhist, xts(data.frame(rep(NA,6), order.by=as.Date("2009-08-01")))

although this will give a warning message about column names
differing. If you have an additional xts with the same column names,
you can simply use merge()

Sean.
On Sat, Jul 4, 2009 at 10:01 AM, Michael<comtech.usa at gmail.com> wrote: