search for: depth_interval

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

Did you mean: depth_intervals
2007 Oct 12
1
Differencing data by groups
...otal there are ~350k rows of data I can calculate simple EventNum averages using meanobs<-aggregate(ctd[,7:9],by=list(EventNum=EventNum),mean) But, I want to calculate a depth-weighted mean for salinity, temp and oxygen for each EventNum. The depth-weighted mean is calculated as Xbar = Sum{depth_interval*temp}/Sum(depth_intervals) Where the depth interval is the differenced depths (i.e., 0.103-0.056 for the second row of data). I cannot seem to get diff to work the way I want it to - advice appreciated Tom Thomas J. Miller, Ph.D. Professor Chesapeake Biological Laboratory University of Marylan...