mfirstNot#
- swordfish.function.mfirstNot()#
If X is a vector:
If k is not specified, return the first element of X that is not null in a sliding window.
If k is specified, return the first element of X that is neither k nor null in the window.
If X is a matrix or table, conduct the aforementioned calculation within each column of X. The result is a vector.
- Parameters:
X (Constant) – A vector/matrix/table/tuple (with scalars or equal-length vectors)/dictionary.
window (Constant) – An integer no smaller than 2 or a scalar of DURATION type indicating the size of the sliding window. Note: The window size is capped at 102400 when m-functions are used in the streaming engines.
k (Constant, optional) – A numeric or string scalar indicating the value to be matched.
minPeriods (Constant, optional) – A positive integer indicating the minimum number of observations in a window required to be not null (otherwise the result is NULL).