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

    Function divide

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

      Parameters

      Returns number[] | number[][]

      divide([[1, 2], [3, 4]], [10, 20]); // [[0.1, 0.2], [0.15, 0.2]]
      divide([1, 2, 3], 2); // [0.5, 1, 1.5]