Subtract mean and divide by standard deviation. Based on base::scale().

ts_scale(x, center = TRUE, scale = TRUE)

Arguments

x

ts_boxable time series

center

logical

scale

logical

Examples

ts_plot(ts_scale((ts_c(airmiles, co2, JohnsonJohnson, discoveries))))
ts_plot(ts_scale(ts_c(AirPassengers, DAX = EuStockMarkets[, 'DAX'])))