frequency() Function

Function

frequency( data_array, bins_array )

Uses the bin array to create groups bounded by the elements of the array.

Parameters

Keyword Type Description

data_array

Decimal Array

The set of numbers that will be divided into groups according to bins_array and then counted

bins_array

Decimal Array

The upper (and inclusive) boundaries of the groups into which the elements from the data array will be dispersed.

Integer Array

Usage considerations

Using the bins_array parameter

The bins_array argument also defines one additional group capturing all numbers greater than the maximum number in bins_array.

Understanding results

The return value represents how many elements from the data array fall into each of these groups.

Examples

You can experiment with this function in the test box below.

Test Input

For example, a bin array equal to {70, 79, 89} defines four groups:

• numbers where number <= 70
• numbers where 70 < number <= 79
• numbers where 79 < number <=89
• numbers > 89

frequency({64,74,75,84,85,86,95},{70,79,89}) returns 1*2*3*1

Open in Github Built: Wed, Jan 26, 2022 (11:43:23 AM)