ANNUAL {bimets} R Documentation

## Annual Time Series (Dis)Aggregation

### Description

This function returns a yearly aggregated time series, by using as input a semiannual, quarterly, monthly or daily time series.

### Usage

```ANNUAL(x = NULL, fun = NULL, avoidCompliance = FALSE, ...)
YEARLY(x = NULL, fun = NULL, avoidCompliance = FALSE, ...)
```

### Arguments

 `x` Input time series, that must satisfy the compliance control check defined in `is.bimets`. `fun` STOCK: the output value of a year is equal to the value of the input time series in the last period of the same year NSTOCK: the output value of a year is equal to the value of the input time series in the last non-missing `NA` period of the same year SUM: the output value of a year is equal to the sum of all the observations of the input time series in the same year NSUM: the output value of a year is equal to the sum of all the non-missing `NA` observations of the input time series in the same year AVE: the output value of a year is equal to the average of all the observations of the input time series in the same year NAVE: the output value of a year is equal to the average of all the non-missing `NA` observations of the input time series in the same year `avoidCompliance` If `TRUE`, compliance control check of input time series will be skipped. See `is.bimets` `...` Backward compatibility.

### Value

This function returns a yearly BIMETS time series.

`SEMIANNUAL`
`QUARTERLY`
`MONTHLY`
`DAILY`

### Examples

```
#TS DAILY TO ANNUAL
n=366
ts1=TIMESERIES(0:n,START=c(2000,1),FREQ='D')
ts1=NA
TABIT(ANNUAL(ts1,fun='NAVE'))

#TS DAILY TO ANNUAL
n=36
ts1=TIMESERIES(0:n,START=c(2000,1),FREQ='M')
ts1=NA
TABIT(YEARLY(ts1,fun='SUM'))
```

[Package bimets version 1.5.3 Index]