Learn R Programming

tsbox (version 0.3.1)

ts_scale: Normalized Time Series

Description

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

Usage

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

Arguments

x

ts_boxable time series

center

logical

scale

logical

Examples

Run this code
# \donttest{
ts_plot(ts_scale((ts_c(airmiles, co2, JohnsonJohnson, discoveries))))
ts_plot(ts_scale(ts_c(AirPassengers, DAX = EuStockMarkets[, 'DAX'])))
# }

Run the code above in your browser using DataLab