Usage
dm2seasonal(x, ...)## S3 method for class 'default':
dm2seasonal(x, season, FUN, na.rm = TRUE, ...)
## S3 method for class 'data.frame':
dm2seasonal(x, season, FUN, na.rm = TRUE, dates, date.fmt = "\%Y-\%m-\%d",
out.type = "data.frame", ...)
Arguments
x
zoo, data.frame or matrix object, with daily or monthly time series.
Measurements at several gauging stations can be stored in a data.frame of matrix object, and in that case, each column of x
represent the time series measured in each gaugi
season
character, indicating the weather season to be used for selecting the data. Valid values are:
-) DJF: December, January, February
-) MAM: March, April, May
-) JJA: June, July, August
-) SO
FUN
Function that will be applied to ALL the values of x
belonging to the given weather season
na.rm
Logical. Should missing values be removed?
-) TRUE : the seasonal values are computed considering only those values different from NA (very important when FUN=sum
)
-) FALSE: if there is AT LEAST one NA within a
dates
numeric, factor or Date object indicating how to obtain the dates.
If 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 into Date class, by usi
date.fmt
Character indicating the format in which the dates are stored in dates, e.g. %Y-%m-%d. See format
in format.Date
.
ONLY required when class(dates)=="factor"<
out.type
Character that defines the desired type of output. Valid values are:
-) data.frame: a data.frame, with as many columns as stations are included in x
, the year corresponding to each seasonal value are used as row names.
-) db
...
further arguments passed to or from other methods.