[R] timeSeries and aggregation() question

00alastair00 alastair.rushworth at nhsbt.nhs.uk
Wed Jan 21 16:03:19 CET 2009


Hello,

I've a time series, T, for an irregular sequence of days (data for bank
holidays weekends have been removed).  I would like to aggregate this series
by into weeks using

aggregate(x, by="weeks", FUN=mean).

To do this, I think that x needs to be a timeSeries object, and when I try
to call

timeSeries(data=T, positions=irregular.sequence.of.days)

I get lots of NAs in the resulting object.  (Note: I've checked that
length(T)=length(irregular.sequence of days).  My dates are of the form
dd/mm/yyyy in case it's relevant.)  

Thanks in advance!
-- 
View this message in context: http://www.nabble.com/timeSeries-and-aggregation%28%29-question-tp21584903p21584903.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list