[R-sig-eco] Loop function or apply?

Jonas Steenholdt Sørensen jonas.steenholdt at gmail.com
Mon Apr 22 12:13:22 CEST 2013


> Hi everbody
> 
> I'm working on my bachelor thesis on clearance rate for mussel and need some help R. First have a look at the DF
> 
> Time            CRobs
> 150              4.6589
> 300              3.9685
> 450              4.0124
> ......               ...........
> 216000       1.0281
> 
> These data is just made up, but is give some idea of the DF. I want to simplify my data and instead of having 144 rows of clearance rate, I want to look at the average within haft an hour. Like this:
> 
> Time       avgCRobs
> 1800         =average from 150-1800
> 3600         =average from 1800-3600
> .....
> 21600       =average from 19800-21600
> 
> I have talk to one of my friend, that working mainly on C++ and he try with a loop function without any help and other of my college and friends from my studies couldn't help either. So I'm hoping there is one that could lead my on the right direction.



More information about the R-sig-ecology mailing list