Subtract mean (sum(x)/n) and divide by standard deviation
(sqrt(sum(x^2)/(n-1))). Based on base::scale().
Usage
ts_scale(x, center = TRUE, scale = TRUE)
Value
a ts-boxable object of the same class as x, i.e., an object of
class ts, xts, zoo, zooreg, data.frame, data.table, tbl,
tbl_ts, tbl_time, tis, irts or timeSeries.
Arguments
x
ts-boxable time series, an object of class ts, xts, zoo,
zooreg, data.frame, data.table, tbl, tbl_ts, tbl_time, tis,
irts or timeSeries.