[R] aggregate

Achim Zeileis Achim.Zeileis at wu-wien.ac.at
Wed May 11 21:59:50 CEST 2005

On Wed, 11 May 2005 15:44:41 -0400 Omar Lakkis wrote:

> I have a data frame of daily open, high, low and settle prices. How
> can I aggregate this data weekly?

When you transform your data from data.frame to a "zoo" time series
object (in package zoo) then you can use the corresponding aggregate
method. See ?aggregate.zoo and the vignette in the package zoo.

Also look at the archives of the finance SIG mailing list which
recently discussed how to do this using the zoo or the its package.

> The data frame has five columns, the first is the date column and the
> rest are the prices.
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

More information about the R-help mailing list