I have an xts object where I want to aggregate the data--while keeping the dates.
wLn = apply(dLn, 2, to.weekly)
> head(wLn)
AAPL GSPC VIX
[1,] -0.05602066 -0.0252409007 0.01903172
[2,] -0.03609222 -0.0111470571 0.13182832
I tried using index to convert the dates, to no avail.