tmrank#

swordfish.function.tmrank()#

Return the rank of each element of X in a sliding window.

Parameters:
  • T (Constant) – A non-strictly increasing vector of temporal or integral type. It cannot contain null values.

  • X (Constant) – A vector of the same size as T.

  • ascending (Constant) – A Boolean value. The default value is true indicating the sorting direction is ascending.

  • window (Constant) – A scalar of positive integer or DURATION type indicating the size of the sliding window.

  • ignoreNA (Constant, optional) – A Boolean value indicating whether null values are ignored in ranking, by default DFLT.

  • tiesMethod (Constant, optional) –

    A string indicating how to rank the group of records with the same value (i.e., ties), by default DFLT.

    • ”min”: lowest rank of the group

    • ”max”: highest rank of the group

    • ”average”: average rank of the group

  • percent (Constant, optional) – A Boolean value, indicating whether to display the returned rankings in percentile form, by default DFLT.