stats_calc {pbox} | R Documentation |
Calculate Basic Statistics
Description
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.
Usage
stats_calc(data, matches, varSet)
## S4 method for signature 'ANY'
stats_calc(data, matches, varSet)
Arguments
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. |
Value
Returns a modified version of 'varSet' with updated values based on the calculations.
[Package pbox version 0.1.8 Index]