[R] Averaging uneven measurements by time with uneven numbers of measurements

Clint Bowman clint at ecy.wa.gov
Thu May 5 22:57:47 CEST 2011


In your first request for help you said, "How do I average the 
measurements by every 30 minutes?"  With 25000 readings over three 
days, it looks as if you are getting readings just about every 
second.

Okay, why don't you use the first reading as your initial weight, 
w0.  Then subtract each succeeding reading from that to obtain the 
amount of feed dispensed.  Now plot that value every 30 minutes.

If you are interested in the variation of feed dispensed over a 
half hour interval, that can be easily obtained by accummulating 
those half-hour readings.

-- 
Clint Bowman			INTERNET:	clint at ecy.wa.gov
Air Quality Modeler		INTERNET:	clint at math.utah.edu
Department of Ecology		VOICE:		(360) 407-6815
PO Box 47600			FAX:		(360) 407-7534
Olympia, WA 98504-7600


         USPS:           PO Box 47600, Olympia, WA 98504-7600
         Parcels:        300 Desmond Drive, Lacey, WA 98503-1274


On Thu, 5 May 2011, Schatzi wrote:

> I do not want smoothing as the data should have jumps (it is weight left in
> feeding bunker). I was thinking of maybe using a histogram-like function and
> then averaging that. Not sure if this is possible.
>
> -----
> In theory, practice and theory are the same. In practice, they are not - Albert Einstein
> --
> View this message in context: http://r.789695.n4.nabble.com/Averaging-uneven-measurements-by-time-with-uneven-numbers-of-measurements-tp3499337p3499386.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list