Preserves the portion of the total held by the column that is being rebalanced.
rebalance_premiums( the_data, column_name_to_rebalance, total_to_rebalance_to, do_keep_column_name = TRUE )
the_data | data.frame |
---|---|
column_name_to_rebalance | character reflecting the name of the (numeric) column that is being rebalanced |
total_to_rebalance_to | numeric |
do_keep_column_name | boolean If FALSE, then automatically renames to "column_name_rebalanced" |
data.frame
#> premiums #> 1 2 #> 2 4 #> 3 6# Returns data.frame(premiums = c(2, 4, 6))