This package makes it easy to summarize windowed data.
A function is applied to successive data subsequences.
You give a summarizing function πΉπ’ππ, the dataπ·ππ‘π, and a window span ππππ.
The result π is of length π α΄Ί, π α΄Ί = length(π·ππ‘π) - ππππ + 1.
- the result omits π α΄Ό = ππππ - 1 indices thatπ·ππ‘π uses.
ways to get as many results as there are data values
Use a vector of padding values with length π α΄Ό
specify a padding vector (default is at the start)
- here is the way to do that
- running(πΉπ’ππ,π·ππ‘π, ππππ; padding = [<values>])
- running(function, data, window_span; padding = [<values>])
specify the padding vector to be at the end
- here is the way to do that
- running(πΉπ’ππ,π·ππ‘π, ππππ; padding = [<values>], padlast = true)
- running(function, data, window_span; padding = [<values>], padlast = true)
Use an empty vector
this fills the π α΄Ό indices by trimming
- here is the way to do that
- running(πΉπ’ππ,π·ππ‘π, ππππ; padding = eltype(π·ππ‘π)[])
- running(function, data, window_span; padding = eltype(π·ππ‘π)[])
-trimming evaluates the window function over available data
- trimmed window spans are less than the specified window_span
Use a vector ofπ padding values
- where1 <= π < π α΄Ό.
this both pads and trims to assign the initial indices
- the firstπ indices of the result will match this vector
- the next π α΄Ό - π indices of the result will be trimmed
- the remaining indices get the rolled results.