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

    Function multiply

    • Element-wise product with R's recycling (a shorter vector is recycled down the columns of a matrix). Equivalent to R's *. The matrix product is matMul.

      Parameters

      Returns number[] | number[][]

      multiply([[1, 2], [3, 4]], [10, 20]); // [[10, 20], [60, 80]]
      multiply([1, 2, 3], 2); // [2, 4, 6]