(sub)Daily -> Monthly
Generic function for transforming a DAILY (sub-daily or weekly) regular time series into a MONTHLY one
daily2monthly(x, ...) subdaily2monthly(x, ...) ## Default S3 method: daily2monthly(x, FUN, na.rm = TRUE, ...) ## S3 method for class 'zoo' daily2monthly(x, FUN, na.rm = TRUE, ...) ## S3 method for class 'data.frame' daily2monthly(x, FUN, na.rm = TRUE, dates=1, date.fmt = "%Y-%m-%d", out.type = "data.frame", out.fmt="numeric", verbose = TRUE, ...) ## S3 method for class 'matrix' daily2monthly(x, FUN, na.rm = TRUE, dates=1, date.fmt = "%Y-%m-%d", out.type = "data.frame", out.fmt="numeric", verbose = TRUE, ...)
x |
zoo, xts, data.frame or matrix object, with daily/monthly time series. |
FUN |
Function that have to be applied for transforming from daily to annual time step. (e.g., for precipitation |
na.rm |
Logical. Should missing values be removed? |
dates |
numeric, factor or Date object indicating how to obtain the dates for each gauging station |
date.fmt |
character indicating the format in which the dates are stored in dates, e.g. %Y-%m-%d. See |
out.type |
Character that defines the desired type of output. Valid values are: |
out.fmt |
OPTIONAL. Only used when |
verbose |
logical; if TRUE, progress messages are printed |
... |
further arguments passed to or from other methods. |
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
###################### ## Ex1: Loading the DAILY precipitation data at SanMartino data(SanMartinoPPts) x <- SanMartinoPPts ## Daily to monthly m <- daily2monthly(x, FUN=sum, na.rm=TRUE) ###################### ## Ex2: Loading the time series of HOURLY streamflows for the station Karamea at Gorge data(KarameaAtGorgeQts) x <- KarameaAtGorgeQts # Sub-daily to monthly ts subdaily2monthly(x, FUN=mean, na.rm=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.