This function preprocesses a time series data for helical plotting by applying a moving average and smoothing the values and their rate of change. It also handles conversion of numeric dates to Date objects and ensures proper alignment of the time series for plotting.
Arguments
- dates
A vector of dates associated with the values; can be numeric or Date objects. If numeric, they are treated as days since a given start date.
- values
A numeric vector of the time series values corresponding to the dates.
- filterWidth
The size of the moving window to calculate the moving average. Defaults to 7