R6 Class representing a compund of data and methods used to calculate stratified percentiles
R6 Class representing a compund of data and methods used to calculate stratified percentiles
raw_dataReturn the data.frame originally handed to the object
result_dataReturn the environment containing a data.frame (<U+00A7>data) containing results of current hierarchy
sub_resultsReturn the named list with Stratified_percentile_calculator_generator objects for recursive stacking
new()Create a new Stratified_percentile_calculator object.
Stratified_percentile_calculator_generator$new( raw_data = NULL, result_data = new.env(), current_stratification_characteristic = NULL, remaining_stratification_characteristics = NULL, value_column = NULL, output_column = NULL, use.na = FALSE )
raw_datadata.frame to perform calculation/stratification on.
result_dataenvironment containing $data, a data.frame with the current state of results.
current_stratification_characteristicnamed list with column name and levels of characteristic to stratify by.
remaining_stratification_characteristicsnamed list with column names and levels of characteristics to stratify by.
value_columncharacter column with values to calculate percentiles on
output_columncharacter column to write calculated percentile values to
use.nalogical indicating whether or not NA/non-listed stratification values should be included as a separate group
A new `Stratified_percentile_calculator` object.
divide_and_calculate()recursively calculate stratified percentiles on data.frame Updates following private fields: - ..result_data$data - ::sub_results - ..current_stratification_characteristic - ..remaining_stratification_characteristics
Stratified_percentile_calculator_generator$divide_and_calculate()
void, but updates ..result_data field
clone()The objects of this class are cloneable with this method.
Stratified_percentile_calculator_generator$clone(deep = FALSE)
deepWhether to make a deep clone.
A calculator has: - raw_data representing the data.frame passed in for calculation - result_data an environment containing the result data.frame $data, shared with - sub_results representing subordinate steps in recursive calculation process