Learn R Programming

dsa (version 1.0.12)

Scaler: Take logs and differences of a time series

Description

Logarithmise and / or difference a time series

Usage

Scaler(x, Diff = 0, Sdiff = 0, Log = FALSE)

Arguments

x

time series

Diff

number of differences to be taken

Sdiff

number of seasonal differences to be taken

Log

Should time series be logarithmised

Details

Function is used in dsa to let the user decide whether logs and differences should be taken.

Examples

Run this code
# NOT RUN {
a = ts(rnorm(100, 100, 10), start=c(2015,1), frequency=12)
Scaler(a, Diff=1, Log=TRUE)
# }

Run the code above in your browser using DataLab