daily2monthly(x, ...)## S3 method for class 'default':
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, 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, date.fmt = "\%Y-\%m-\%d",
out.type = "data.frame", out.fmt="numeric", verbose = TRUE, ...)
x
represent the time series measured in each gauFUN=sum
and for temperature and streamflow ts, FUN=mean
).dates
is a number, it indicates the index of the column in x that stores the dates
If dates
is a factor, it is converted iformat
in as.Date
.
ONLY required when class(dates)=="factor"
ox
, and row names indicating the month and year for each value.
-) db x
is a matrix or data.frame object /cr
character, for selecting if the result will be a matrix/data.frame or a zoo object. Valid values are: numeric, zoo.daily2annual
, monthlyfunction
, hydroplot
, vector2zoo
, izoo2rzoo
, as.Date
## Loading the SanMartino precipitation data
data(SanMartinoPPts)
x <- SanMartinoPPts
## Daily to Monthly
m <- daily2monthly(x, FUN=sum, na.rm=TRUE)
Run the code above in your browser using DataLab