rStats.js v1.3.0
    Preparing search index...

    Function naOmit

    • The values that are not missing. Equivalent to R's na.omit(). For a vector.

      Parameters

      • x: readonly number[] | Float64Array<ArrayBufferLike>

      Returns number[]

      naOmit([1, NaN, 3]); // [1, 3]
      
    • The values that are not missing. Equivalent to R's na.omit(). For a vector.

      Type Parameters

      • T extends string | number | boolean

      Parameters

      • x: readonly (T | null)[]

      Returns T[]

      naOmit([1, NaN, 3]); // [1, 3]
      
    • The complete rows of a data frame, as R's na.omit() for a data frame: the same columns, in order, restricted to the rows where none is missing (null, or NaN in a numeric column); see completeCases.

      Type Parameters

      Parameters

      • x: D

      Returns D

      naOmit({ a: [1, NaN, 3], s: ["u", "v", null] }); // { a: [1], s: ["u"] }