I want to set the specific dates of an xts object but it shifts the dates one day.
aapl <- as.xts(read.zoo(textConnection("
2007-04-26, 98.84
2007-04-27, 99.92
2007-04-30, 99.80
2007-05-01, 99.47
2007-05-02, 100.39"), sep=","))
idx_aapl <- index(aapl)
idx_aapl
xts:::index.xts(aapl) # makes no difference
idx_aapl <- idx_aapl + 1
idx_aapl
How can I assign the specific dates shown? I have read something about posixct but I don't know how to assign it to the index.