Hi I assume that maybe package zoo and na.locf could help you.
Petr r-help-boun...@r-project.org napsal dne 02.01.2009 09:44:00: > Hi, > > I hope that someone can help me write the right commands. > I have a data set with 3 columns > > player_name|number_goals|year|day > > not every player is listed for every year-day-hour > > I would like to compute the "growth rate" of each player A so if player > scored on day X 3 goals and on day X+1 6 goals then her grow rate is 100% .. > If she did not score on day X then maybe we set a default scoring value of 1 > on day X .. I am looking for ways to deal with that. > > Finally I have another data set with 2 columns > player_name|growth_rate|year|day , I would like to compute the average > growth rate from day X to X-1, from day X to X-2, from day X to X-3 .. etc > > Does anyone know a package that will enable me to complete these tasks > easily? > > Thank you for your time. > > [[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. ______________________________________________ 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.