On Mon, Sep 26, 2011 at 5:54 AM, Brian G. Peterson <brian@braverock.com>wrote:

> On Mon, 2011-09-26 at 15:11 +0530, Arun Krishnamoorthy wrote:
> > Is there a nice way to aggregate daily data from xts or zoo to a
> > monthly level?
>
>
> If you're going to ask a new (even related question),  please start a
> new thread.
>
> seee
>
> ?to.monthly
>
> and more generically, see
>
> ?to.period
>
> Regards,
>
>   - Brian
>
>
Or, aggregate!

> new <- getSymbols("INR=X",src='yahoo',auto.assign=FALSE)
> aggregate(new, months(index(new)), mean)
          INR=X.Open INR=X.High INR=X.Low INR=X.Close INR=X.Volume
April       44.18796   44.18796  44.18796    44.18796            0
August      44.73945   44.73945  44.73945    44.73945            0
December    45.05793   45.05793  45.05793    45.05793            0
February    44.87220   44.87220  44.87220    44.87220            0
January     44.65905   44.65905  44.65905    44.65905            0
July        44.57396   44.57396  44.57396    44.57396            0
June        44.56389   44.56389  44.56389    44.56389            0
March       45.17081   45.17081  45.17081    45.17081            0
May         44.31505   44.31505  44.31505    44.31505            0
November    44.75988   44.75988  44.75988    44.75988            0
October     44.75101   44.75101  44.75101    44.75101            0
September   45.48010   45.48010  45.48010    45.48010            0
          INR=X.Adjusted
April           44.18796
August          44.73945
December        45.05793
February        44.87220
January         44.65905
July            44.57396
June            44.56389
March           45.17081
May             44.31505
November        44.75988
October         44.75101
September       45.48010

	[[alternative HTML version deleted]]

