Integer Frequency
This class tabulates the frequency associated with the integers presented to it via the collect() method Every value presented is interpreted as an integer For every value presented a count is maintained. There could be space/time performance issues if the number of different values presented is large. Use lowerLimit and upperLimit to limit the values that can be observed. Values lower than the lower limit are counted as underflow and values greater than the upper limit are counted as overflow.
This class can be useful for tabulating a discrete histogram over the values (integers) presented.
Author
rossetti
Parameters
the defined lower limit of the integers, values less than this are not tabulated
the defined upper limit of the integers, values less than this are not tabulated
a name for the instance
an array of data to tabulate
Constructors
This class tabulates the frequency associated with the integers presented to it via the collect() method Every value presented is interpreted as an integer For every value presented a count is maintained. There could be space/time performance issues if the number of different values presented is large. Use intRange to limit the values within the specified range that can be observed. Values lower than the lower limit are counted as underflow and values greater than the upper limit are counted as overflow.
Properties
Returns a closed range over the observed integer values
Returns an array of size numberOfCells containing the frequencies for each value observed. The 0th element is the frequency for the value stored at element 0 of the array returned by the values property
Returns the number of cells tabulated This is also the total number of different integers observed
The number of observations that fell past the last bin's upper limit
Returns an array of size numberOfCells containing the proportion by value. The 0th element is the proportion for the value stored at element 0 of the array returned by the values property, etc.
The total count associated with the values The total number of values observed
The number of observations that fell below the first bin's lower limit
Returns Map holding the values and cumulative proportions as arrays with keys "values" and "cumulativeProportions"
Returns Map holding the values and frequencies as arrays with keys "values" and "frequencies"
Returns Map holding the values and proportions as arrays with keys "values" and "proportions"
Functions
Assigns a string label to each observed integer value. If the integer values in the labels map is not one of the observed values then no assignment occurs and the default label is used. This should be done after collection because cells are created during the collection process.
Returns a copy of the cells in a list ordered by the value of each cell, 0th element is cell with the smallest value (integer) observed, etc
Returns a sorted list containing the cells
Returns a copy of the cells in a list ordered by the count of each cell, 0th element is cell with the largest count, etc
Returns the cumulative frequency up to an including i
Returns the cumulative proportion up to an including i
Text output for the frequency without the summary statistics.
Interprets the elements of x[] as values and returns an array representing the frequency for each value
Returns the data associated with the tabulation.
Creates a plot for the integer frequencies. The parameter, proportions indicates whether proportions (true) or frequencies (false) will be shown on the plot. The default is false.
Gets the proportion of the observations that are equal to the supplied integer
Converts the integer frequency data into a dataframe representation