Hello Jeff, thank you very much for following up with me on this. It
definitely helped me get on my way with my analysis. It figures your from
UC Davis (I'm guessing from your email address), I've been helped out by
them often! -Eric
Eric Morway
Hydrologist
2730 N. Deer Run Rd.
Carson City, N
Sorry, I put too many bugs (opportunities for excellence!) in this on my
first pass on this to leave it alone :-(
isPartialWaterYear2 <- function( d ) {
dtl <- as.POSIXlt( d )
wy1 <- cumsum( ( 9 == dtl$mon ) & ( 1 == dtl$mday ) )
# any 0 in wy1 corresponds to first partial water year
res
# read about POSIXlt at ?DateTimeClasses
# note that the "mon" element is 0-11
isPartialWaterYear <- function( d ) {
dtl <- as.POSIXlt( dat$Date )
wy1 <- cumsum( ( 9 == dtl$mon ) & ( 1 == dtl$mday ) )
( 0 == wy1 # first partial year
| ( 8 != dtl$mon[ nrow( dat ) ] # end partial year
3 matches
Mail list logo