Computes basic statistics such as mean and median for specified variables in a data frame or data table based on a set of operations specified in the `matches` data frame. This function updates the `varSet` with the computed results for each variable.
Method implementation for calculating statistics using 'data.table' and 'stats'. This method allows the computation of mean and median for subsets of data defined in `matches` and updates `varSet` with these results.
stats_calc(data, matches, varSet)# S4 method for ANY
stats_calc(data, matches, varSet)
Returns a modified version of `varSet` with updated values based on the calculations.
A data frame or data table.
A data frame describing the operations to apply.
A data frame to be updated with results.