search for: dailyaverage

Displaying 1 result from an estimated 1 matches for "dailyaverage".

2010 Jun 28
1
Subtraction loop
I have a data frame with 2 columns, one for day and one for average. The day starts at 97 all the way to 279. I want to subtract day 98 average- day 97 average, then day99 average -day 98 average and so on down my list, creating another column with the subtracted results. I have: Day DailyAverage 1 97 0.6076782 2 98 0.7121478 3 99 0.8059347 4 100 0.9545806 5 101 1.0589791 6 102 1.1335981 7 103 1.2676922 8 104 1.4429847 9 105 1.6477266 10 106 1.7970784 etc. with values to day 279 I'm guessing I need to create some kind of loop for this...