Stefano, On 13 April 2012 20:51, Stefano Sofia <stefano.so...@regione.marche.it>wrote:
> I have a data frame as below specified. > From the 1st of May to the 30th of September of several years (e.g. from > 2004 to 2011) I have a frequency of accidents. > I need the mean of accidents divided by weeks (i.e. the mean of accidents > from the 1st to the 7th of May of all the years, from the 8th to the 14th > of May, > ..., from the 29th to the 31st of May, from the 1st to the 7th of July and > so on). > Is there an easy way to do that? > Take a look at https://bitbucket.org/hd1/financeocr/raw/13c4990bd21b/visualizations/dayAmountsHist.Rto get the subsets and sapply(list, mean, simplify=TRUE). -- H -- Sent from my mobile device Envoyait de mon portable [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.