Navigation
Synopsis Cumulative frequency of values less than or equal to a given value.
Function
  1. int cumFreq(list[value] values, num n)
  2. int cumFreq(list[value] values, str s)
Usage import analysis::statistics::Frequency;
Description Returns the cumulative frequency of values less than or equal to a given numeric or string value. Returns 0 if the value is not comparable to the values set.
Examples
rascal>import analysis::statistics::Frequency;
ok
rascal>
cancelled
rascal>D = [1, 2, 1, 1, 3, 5];
list[int]: [1,2,1,1,3,5]
rascal>cumFreq(D, 1);
int: 3
rascal>cumFreq(D, 2);
int: 4
rascal>cumFreq(D, 10);
int: 6
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.