Skip to content
Prev 259120 / 398503 Next

Averaging uneven measurements by time with uneven numbers of measurements

Taking the final value for each 30-minute interval seems like it would get what I want. The problem is that sometimes this value would be 15 minutes before the end of the 30-minute interval. What would I use to pick up this value?

-----Original Message-----
From: ehlers at ucalgary.ca [mailto:ehlers at ucalgary.ca] 
Sent: Thursday, May 05, 2011 03:58 PM
To: Thompson, Adele - Adele_Thompson at cargill.com
Cc: r-help at r-project.org
Subject: Re: [R] Averaging uneven measurements by time with uneven numbers of measurements
On 2011-05-05 14:20, Schatzi wrote:
(It would be useful to include your original request - not everyone
uses Nabble.)

Actually, averaging *is* smoothing, but I suppose your intent is, for
some reason, not to smooth across 30-minute boundaries.

Perhaps you could use findInterval() to identify which measurements to
average.

Peter Ehlers