# TimeAxisArrays.collapseFunction.

collapse(A::TimeAxisArray, tsreducer::Function, reducer::Function=tsreducer)

Collapses the timestamps of A to a single observation in the time dimension using tsreducer. Data is collapsed in the time dimension using reducer, which defaults to tsreducer.

# TimeAxisArrays.downsampleFunction.

downsample(A::TimeAxisArray, splitter::Function, tsreducer::Function, reducer::Function=tsreducer)

Combines split, collapse, and vcat to partition A according to sequential values in the mapping of splitter over the timestamps of A, then collapses each of the split TimeAxisArrays according to tsreducer (for timestamps) and reducer (for data), before recombining the collapsed values.

# TimeAxisArrays.dropifMethod.

dropif(selector::Function, predicate::Function, A::TimeAxisArray)

Drops observations at timestamps where selector (e.g. any, all) data values statisfy predicate.

# TimeAxisArrays.dropnanFunction.

dropnan(selector::Function, A::TimeAxisArray)

Drops observations at timestamps where selector (e.g. any, all) data values are NaN. Equivalent to dropif(selector, isnan, A)

# TimeAxisArrays.lagFunction.

lag(A::TimeAxisArray, k::Int=1)

Shifts all observations in A later in time by k timestamps.

# TimeAxisArrays.leadFunction.

lead(A::TimeAxisArray, k::Int=1)

Shifts all observations in A earlier in time by k timestamps.

# TimeAxisArrays.movingMethod.

moving(A::TimeAxisArray, reducer::Function, n::Int)

Applies a time-wise reduction specified by reducer to a moving window of n observations, storing the result at the last timestamp in the window.

# TimeAxisArrays.percentchangeMethod.

percentchange(A::TimeAxisArray; logdiff::Bool=false)

Computes the percent change between observations in time in A. If logdiff is true, returns the difference of log-transformed values.

# Base.LinAlg.diffFunction.

diff(A::TimeAxisArray, k::Int=1)

Perform kth order differencing across time observations in A.

# Base.splitMethod.

split(A::TimeAxisArray, f::Function)

Returns an array containing sequential fragments of A, split according to clusters of values in the mapping of f over the timestamps of A. split(f, A) is also defined so as to support do-notation.