# Smooth a time series
data(presidents)
stream <- data.frame(
presidents,
.time = time(presidents)) %>%
DSD_Memory()
plot(stream, dim = 1, n = 120, method = "ts", main = "Original")
smoothStream <- stream %>% DSF_ExponentialMA(alpha = .7)
smoothStream
reset_stream(smoothStream)
plot(smoothStream, dim = 1, n = 120, method = "ts", main = "With ExponentialMA(.7)")
Run the code above in your browser using DataLab