An example of your data might clarify this but have a look at:
- filter
- embed
- rollmean and rapply in the zoo package.
- runmean in caTools package
- running in gmodels package
On 5/3/06, Hans-J?rgen Auinger <Hans-JuergenAuinger at web.de>
wrote:> Hi people,
>
> my problem is, that I have to get the average daily gain of goats through
the first eight weeks and the following five month.
> I have the birth weight and about every four week a new weight.
> Now I like to know, how I can choose the weight next to the age of eight
week of the goats, so that I?m able to get the average daily gain in the time
before that date and after that date. Maybe you know where to look for an
answere to my question.
>
> Thanks for helping and regards
>
> Hans-J?rgen Auinger
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
>