apply.quarterly() only gives the end month of each quarter as the index, see the following example:
library(quantmod)
getSymbols.FRED("CPILFESL")
apply.quarterly(CPILFESL,mean)
CPILFESL
1957-03-01 28.60000
1957-06-01 28.83333
1957-09-01 29.03333
1957-12-01 29.26667
1958-03-01 29.40000
1958-06-01 29.53333
...
What I really want is:
CPILFESL
1957-01-01 28.60000
1957-04-01 28.83333
1957-07-01 29.03333
1957-10-01 29.26667
1958-01-01 29.40000
1958-04-01 29.53333
...
So how can I set the first month of each quarter as the index after applying apply.quarterly()?
Thanks