title: hydrological year time series
body: <p>Currently I am working on a river discharge data analysis. I have the daily discharge record from 1935 to now. I want to extract the annual maximum discharge for each hydrolocial year (start from 01/11 to next year 31/10). However, I found that the hydroTSM package can only deal with the natural year. I tried to use the "zoo" package, but I found it's difficult to compute, as each year have different days. Does anyone have some idea? Thanks. </p>
  
  <p>the data looks like:</p>
  
  <pre><code>01-11-1935 663
  02-11-1935 596
  03-11-1935 450
  04-11-1935 381
  05-11-1935 354
  06-11-1935 312
  </code></pre>
  
  <p>my code:</p>
  
  <pre><code>mydata&lt;-read.table("discharge")
  colnames(mydata) &lt;- c("date","discharge")
  
  library(zoo)
  z&lt;-zooreg(mydata[,2],start=as.Date("1935-11-1"))
  
  mydta$date &lt;- as.POSIXct(dat$date)
  
  q.month&lt;-daily2monthly(z,FUN=max,na.rm = TRUE,date.fmt = "%Y-%m-%d",out.fmt="numeric")
  q.month.plain=coredata(q.month)
  
  z.month&lt;-zooreg(q.month.plain,start=1,frequency=12)
  </code></pre>