# NOT RUN {
######################
## Ex1: Loading the DAILY precipitation data at SanMartino
data(SanMartinoPPts)
x <- SanMartinoPPts
## Daily to Annual
daily2annual(x, FUN=sum, na.rm=TRUE)
######################
## Ex2: Monthly to Annual (same result as )
m <- daily2monthly(x, FUN=sum, na.rm=TRUE)
monthly2annual(m, FUN=sum, na.rm=TRUE)
######################
## Ex3: Loading the time series of HOURLY streamflows for the station Karamea at Gorge
data(KarameaAtGorgeQts)
x <- KarameaAtGorgeQts
# Sub-daily to monthly ts
subdaily2annual(x, FUN=mean, na.rm=TRUE)
############
## Ex4: Loading the monthly time series of precipitation within the Ebro River basin
data(EbroPPtsMonthly)
# computing the annual values for the first 10 gauging station in 'EbroPPtsMonthly'
a <- monthly2annual(EbroPPtsMonthly[,1:11], FUN=sum, dates=1)
# same as before, but with a nicer format of years
a <- monthly2annual(EbroPPtsMonthly[,1:11], FUN=sum, dates=1, out.fmt="%Y")
# }
Run the code above in your browser using DataLab