[R] time series analysis
kridox at ymail.com
Fri Feb 28 02:01:15 CET 2014
Maybe functions "xts", "endpoints" and "period.apply" of the "xts"
package might help you.
On Fri, Feb 28, 2014 at 1:32 AM, Yang Yang <simonyangyang at gmail.com> wrote:
> 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?
> the data looks like:
> 01-11-1935 66302-11-1935 59603-11-1935 45004-11-1935 38105-11-1935
> 35406-11-1935 312
> my code:
> colnames(mydata) <- c("date","discharge")
> mydta$date <- as.POSIXct(dat$date)
> q.month<-daily2monthly(z,FUN=max,na.rm = TRUE,date.fmt =
> Thanks very much.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> 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