It would be something like this (might have to change the syntax a bit)
bin_ave=0;
while (i <lenth(time)){
bin_ave[k]=mean(time(i:i+6));
k=k+1;
i=i+6;
}
if your data is in a table format replace time with mytable$time.
hope this helps,
Sachin
p.s. sorry about corporate notice
--- Please consider the environment before printing this email ---
Allianz - Best General Insurance Company of the Year 2010*
Allianz - General Insurance Company of the Year 2009+
* Australian Banking and Finance Insurance Awards
+ Australia and New Zealand Insurance Industry Awards
This email and any attachments has been sent by Allianz ...{{dropped:3}}
______________________________________________
[email protected] 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.