Thank you very much Brian. Indeed, by looking at ?tapply() this would do the job for regular time series (whose data-time INDEX renders itself naturally for " bundling data" in regular groups). However, with irregular time series the story is different, as some careful "bundling" is necessary prior to applying tapply(). Whereas this may not be a problem for months (creating strings month-year), it would be for weeks, for instance. Also the object returned would need to be converted again to a time series object with additional function calls. Furthermore, the function AggregateSeries() provides additional functionality, such as creating moving averages, rolling variances, minima and maxima, all with options to the same function call. I take from your response that there is no easy way out (an already existing function), and that some programming will be required.

Kind regards,

Ivan
_______________________
Ivan Alves
mailto://[EMAIL PROTECTED]
On 25 Mar 2004, at 22:51, Prof Brian Ripley wrote:

R itself has no support for irregular time series, but it does have an
aggregate method for regular ones. You need to look into whichever
package is handling irregular time series. However, it seems to me that
this is not a time series problem at all: you have a set of observations
whose indices are data-times, and tapply() will do the job.


On Thu, 25 Mar 2004, Ivan Alves wrote:

S-Plus has the function AggregateSeries() whose name is self
explanatory.  For instance one can derive monthly series from daily
ones by specifying end-of-period, averages, sums, etc.  I looked for a
similar function in the packages "its" and "tseries", but found
nothing.  I also help.searched() for aggregate to no avail.  Would
anybody be so kind to point me in the right direction?

-- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595


______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to