firstNot#

swordfish.function.firstNot()#

If X is a vector:

  • If k is not specified: return the first element of X that is not null.

  • If k is specified: return the first element of X that is neither k nor null.

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 scalar, pair, vector, matrix or table.

  • k (Constant, optional) – A scalar.