## Loading the SanMartino precipitation data
data(SanMartinoPPts)
x <- SanMartinoPPts
## Winter (DJF) mean values of precipitation for each year of 'x'
dm2seasonal(x, FUN=mean, season="DJF")
############
############
## Loading the monthly time series of precipitation within the Ebro River basin.
data(EbroPPtsMonthly)
x <- EbroPPtsMonthly
## Winter (DJF) mean values of precipitation for the first 3 stations
## in 'EbroPPtsMonthly' (its first column stores the dates)
dm2seasonal(x[,1:4], FUN=mean, season="DJF", dates=1)
## The same previous example, but using a zoo object
dates <- as.Date(x[,1]) # dates of the zoo object
z <- zoo(x[ ,2:ncol(x)], dates) # zoo creation
dm2seasonal(z, FUN=mean, season="DJF")
Run the code above in your browser using DataLab