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

    Function hist

    • Histogram counts. Equivalent to R's hist(x, plot = FALSE). Break points (by default pretty points over the range with about Sturges' number of cells), counts, densities and cell midpoints. Non-finite values are dropped.

      Parameters

      Returns HistResult

      hist([1, 2, 2, 3, 3, 3, 4]).counts; // [3, 3, 1] (for breaks [1, 2, 3, 4])