stats_calc | R Documentation |
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 signature 'ANY'
stats_calc(data, matches, varSet)
data |
A data frame or data table. |
matches |
A data frame describing the operations to apply. |
varSet |
A data frame to be updated with results. |
Returns a modified version of 'varSet' with updated values based on the calculations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.