> > I want to add an additional column at the right and get in 
> each row a value which shows the mean of "hunger" of the last two hours.

Isn't that just a moving average?

if so, see 
http://stackoverflow.com/questions/743812/calculating-moving-average-in-r, 
which mentions zoo for RollingMeans, TTR for MovingAverages, forecast for ma 
and a possible solution using filter. One of those might help.

S Ellison

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
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.

Reply via email to