Skip to contents

Returns the exact preprocessing used by ts_peaks_over_threshold(). Moving average and moving sum with period 1 return an identity copy; differencing applies at every period.

Usage

ts_smoothed_series(
  ts,
  smoothing = c("none", "moving_average", "moving_sum", "difference"),
  period = 1
)

Arguments

ts

a corehydro_ts.

smoothing

"none", "moving_average", "moving_sum", or "difference".

period

the moving window or difference lag.

Value

a corehydro_ts.