Liking cljdoc? Tell your friends :D

datajure.row

Row-wise (cross-column) function implementations for datajure. Each function takes multiple columns and returns a single column of the same length. These operate across columns within a single row, complementing window functions (which operate down a single column).

Nil conventions (matching spec):

  • row-sum: nil treated as 0 (like R rowSums(na.rm=TRUE))
  • row-mean, row-min, row-max: skip nil
  • All return nil when every input is nil

Return dtypes:

  • row-sum / row-mean / row-min / row-max return :object readers so that the all-nil-row case can return nil honestly. A :float64 reader would coerce nil to NaN (which tech.v3.dataset then folds into the missing set when stored in a dataset column — so dt-wrapped use looks fine, but a direct caller reading the reader would see NaN, contradicting the docstring).
  • row-count-nil returns :int64 (always a count, never nil).
  • row-any-nil? returns :boolean (always a boolean, never nil).
Row-wise (cross-column) function implementations for datajure.
Each function takes multiple columns and returns a single column
of the same length. These operate across columns within a single row,
complementing window functions (which operate down a single column).

Nil conventions (matching spec):
  - row-sum: nil treated as 0 (like R rowSums(na.rm=TRUE))
  - row-mean, row-min, row-max: skip nil
  - All return nil when every input is nil

Return dtypes:
  - row-sum / row-mean / row-min / row-max return :object readers so that
    the all-nil-row case can return nil honestly. A :float64 reader would
    coerce nil to NaN (which tech.v3.dataset then folds into the missing
    set when stored in a dataset column — so dt-wrapped use looks fine,
    but a direct caller reading the reader would see NaN, contradicting
    the docstring).
  - row-count-nil returns :int64 (always a count, never nil).
  - row-any-nil? returns :boolean (always a boolean, never nil).
raw docstring

row-any-nil?clj

(row-any-nil? & cols)

Boolean: true if any column value is nil for that row.

Boolean: true if any column value is nil for that row.
sourceraw docstring

row-count-nilclj

(row-count-nil & cols)

Count of nil values across columns per row. Returns an integer column.

Count of nil values across columns per row. Returns an integer column.
sourceraw docstring

row-maxclj

(row-max & cols)

Maximum of non-nil values across columns per row. Skips nil; returns nil when all inputs are nil. Non-nil results are promoted to double for consistency with row-sum and row-mean.

Maximum of non-nil values across columns per row. Skips nil; returns nil when all inputs are nil.
Non-nil results are promoted to double for consistency with row-sum and row-mean.
sourceraw docstring

row-meanclj

(row-mean & cols)

Mean of non-nil values across columns per row. Skips nil; returns nil when all inputs are nil.

Mean of non-nil values across columns per row. Skips nil; returns nil when all inputs are nil.
sourceraw docstring

row-minclj

(row-min & cols)

Minimum of non-nil values across columns per row. Skips nil; returns nil when all inputs are nil. Non-nil results are promoted to double for consistency with row-sum and row-mean.

Minimum of non-nil values across columns per row. Skips nil; returns nil when all inputs are nil.
Non-nil results are promoted to double for consistency with row-sum and row-mean.
sourceraw docstring

row-sumclj

(row-sum & cols)

Sum values across columns per row. Nil treated as 0; returns nil when all inputs are nil.

Sum values across columns per row. Nil treated as 0; returns nil when all inputs are nil.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close