.compute_ratios | R Documentation |
The function takes in a data frame and a set of utility variables. For each pair of utility variables, it computes their ratio and adds a new column to the data frame. The new columns are named in the format "F_ratio_Var1_Var2".
.compute_ratios(df, combinations, utility_columns)
df |
A data frame containing the utility variables for which ratios are to be computed. |
combinations |
A matrix variable specifying the utility_columns combinations. |
utility_columns |
A character vector specifying the names of the utility variables in the data frame. |
A data frame with additional columns corresponding to the computed ratios.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.