View source: R/rescale_values.R
rescale_values | R Documentation |
Re-scale a group of designated columns so their sum equals sum_to
rescale_values(
data_df = NULL,
col_names = NULL,
sum_to = 100,
min_value = 80,
max_value = 120
)
data_df |
input data.frame |
col_names |
character vector of columns that should sum to |
sum_to |
the value that the columns should sum to |
min_perc |
minimum sum of columns that should be re-scaled to |
max_perc |
maximum sum of columns that should be re-scaled to |
a tibble with corrected percentages that sum to 100
Kevin See and Mike Ackerman
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.