The US water year extends from 01 October yyyy-1 through 30 September yyyy
and is referenced by the year starting on the included 01 January yyyy.  
I'd like to be able to find the annual means for the water year.  To do so 
I've taken the input date-time, which is in the usual format 

"1991-10-07 10:35:00"

changed it by:

w$d<-as.POSIXct(w$date.time)

Now I can add an offset of 92 days 

w$w.year<-as.POSIXct(w$d+7948800)

and have the years correspond to the "water year."

Now I wish to obtain some means by something like:

waterT<-aggregate(w$value[w$param.name=="Temperature"],
list(w$w.year[w$param.name=="Temperature"]),mean)

Except that I need to work on the year and being a neophyte in date 
arithmetic I'm not finding a working method.

TIA

Clint

-- 
Clint Bowman                    INTERNET:       [EMAIL PROTECTED]
Air Quality Modeler             INTERNET:       [EMAIL PROTECTED]
Department of Ecology           VOICE:          (360) 407-6815
PO Box 47600                    FAX:            (360) 407-7534
Olympia, WA 98504-7600

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to