ta | R Documentation |
Performs temporal aggregation of high to low frequency time series.
Currently, ta
only works with ts
or mts
time series
objects.
ta(x, ...)
## S3 method for class 'ts'
ta(x, conversion = "sum", to = "annual", ...)
x |
a time series object of class |
... |
additional arguments, passed to the methods. |
conversion |
type of conversion: |
to |
(low-frequency) destination frequency as a character
string ( |
ta
is used to aggregate a high frequency time series into a low
frequency series, while the latter is either the sum, the average, the first
or the last value of the high-frequency series. ta
is the inverse
function of td()
. If applied to an output series of td
,
ta
yields the original series.
ta
returns an object of class "ts"
or "mts"
,
depending on the class of the input series.
td()
for the main function for temporal disaggregation.
data(swisspharma)
sales.q.a <- ta(sales.q, conversion = "sum", to = "annual")
all.equal(sales.a, sales.q.a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.