transforms monthly data into annual ones
tsout=m2a(tsin,ind)
tsin = a monthly timeseries
ind =
- -1 if the annual data is to be the sum of the corresponding months
- 0 if the annual data is to be the mean of the corresponding months
- i if the annual value is to be eqaul to the value of the i-th month
ind is optional; if not provided, it is set to -1
tsout = the corresponding annual time series
ts = reshape([1:35],'1978m4') // ceate a monthly ts y = m2a(x) // gives an annual ts, from 1979a to 1980a with values 186 and 330 y = m2a(x,-1) // gives an annual ts, from 1979a to 1980a with values 186 and 330 y = m2a(x,3) // gives an annual ts, from 1979a to 1981a with values 11, 23, 35