Re: [R] Manipulation in timeSeries object:how to use the function "applySeries" by daily?

From: Jeff Ryan <>
Date: Tue, 11 Nov 2008 09:04:48 -0800 (PST)

Take a look at xts, a time series class that extends zoo and is compatible (forward and backwards) with all major time-series classes, including timeSeries from Rmetrics.

It has a few functions that may be of interest:


It may also be useful to use the Fortran-based aggregation by time functions to turn your series into an OHLC series.

See ?to.period

quantmod also has a ?periodReturn function that may be of interest.

Some examples of all the above can be found at


tedzzx wrote:
> Hi all
> I have some tick-by-tick data and I have calculated the intraday returns.
> I want to sum up the intraday squared returns to calculate the daily
> volatility(or daily variance). I know that the s-plus FinMerics has the
> function aggregateSeries function that can be apply to daily data:
> aggregateSeries(x, Fun, by="daily"), but the counterpart function in
> R:applySeries can not be apply to daily data. This function has the
> argument by=c("monthly", "quartly").
> Can we find some way to mimic the aggregateSeries function in s-plus?
> Thanks in advance
> Ted

View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 11 Nov 2008 - 17:09:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 11 Nov 2008 - 17:30:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive